-
-
Save wusted/3e07d94d0aa89b3514d9907f74d0a28f to your computer and use it in GitHub Desktop.
YAML space indent for vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax on | |
| filetype plugin indent on | |
| "Get the 2-space YAML as the default when hit carriage return after the colon | |
| autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
| set is hlsearch ai ic scs | |
| nnoremap <esc><esc> :nohls<cr> | |
| "https://vim.fandom.com/wiki/Moving_lines_up_or_down | |
| nnoremap <A-j> :m .+1<CR>== | |
| nnoremap <A-k> :m .-2<CR>== | |
| inoremap <A-j> <Esc>:m .+1<CR>==gi | |
| inoremap <A-k> <Esc>:m .-2<CR>==gi | |
| vnoremap <A-j> :m '>+1<CR>gv=gv | |
| vnoremap <A-k> :m '<-2<CR>gv=gv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment