Skip to content

Instantly share code, notes, and snippets.

@wusted
Forked from dragonken/.vimrc
Created December 13, 2022 08:41
Show Gist options
  • Select an option

  • Save wusted/3e07d94d0aa89b3514d9907f74d0a28f to your computer and use it in GitHub Desktop.

Select an option

Save wusted/3e07d94d0aa89b3514d9907f74d0a28f to your computer and use it in GitHub Desktop.
YAML space indent for vim
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