Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Latest commit

 

History

History
45 lines (31 loc) · 959 Bytes

notes.md

File metadata and controls

45 lines (31 loc) · 959 Bytes

Notes

example plugins and configuration https://medium.com/geekculture/neovim-configuration-for-beginners-part-two-fb3834da91b8

autocommand runs commands when creating a buffer

If you want to know more about anything on vim, just use :help name

Keybindings

inoremap: maps the key in insert mode
nnoremap: maps the key in normal mode
vnoremap: maps the key in visual mode

: represents Control key : Alt key

" copies filepath to clipboard by pressing yf

:nnoremap <silent> yf :let @+=expand('%:p')<CR>

" copies pwd to clipboard: command yd

:nnoremap <silent> yd :let @+=expand('%:p:h')<CR>

" Vim jump to the last position when reopening a file

if has("autocmd")
  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
    \| exe "normal! g'\"" | endif
endif

Snippets

Example json based snippets for markdown

https://github.com/rafamadriz/friendly-snippets/blob/main/snippets/markdown.json