Skip to content

Instantly share code, notes, and snippets.

@aka-apri
Forked from dragonken/.vimrc
Created December 6, 2022 08:31
Show Gist options
  • Save aka-apri/fca8acad71957bd49b8ddfe9a69e7627 to your computer and use it in GitHub Desktop.
Save aka-apri/fca8acad71957bd49b8ddfe9a69e7627 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