- Fix: <ctrl-backspace> was leaving a "u" insert keymap was fixed
- Added keymaps for moving line(s) up/down with <alt>j,k
- Minor quote lints
This commit is contained in:
Pratik Tripathy
2024-03-09 22:24:07 +05:30
parent cfd64e24c7
commit e85d1170bc
3 changed files with 21 additions and 16 deletions

View File

@@ -94,8 +94,11 @@ inoremap <M-l> <Right>
inoremap <M-j> <Down>
inoremap <M-k> <Up>
" Ctrl+Backspace to add an undo-point and delete last word
imap <C-BS> <C-W><C-g>u
" Move Lines with Alt+j,k
nnoremap <M-j> :m .+1<cr>==
nnoremap <M-k> :m .-2<cr>==
vnoremap <M-j> :m '>+1<cr>gv=gv
vnoremap <M-k> :m '<-2<cr>gv=gv
" Insert mode: add undo points on "," & "." & ";"
imap , ,<C-g>u

View File

@@ -32,6 +32,7 @@ colorscheme deep-space
" VIM SPECIFIC CONFIG
"
""""""""""""""""""""""""""""""""
" Move the .viminfo file inside .vim directory
set viminfofile=$VIMDIR/viminfo
@@ -41,10 +42,11 @@ autocmd! bufwritepost $VIMRC source %
" Save inside vim config directory
set undodir=$VIMDIR/undo//
" Ctrl+Backspace to add an undo-point and delete last word
" It's here cause ideavim messes it up
imap <C-BS> <C-g>u<C-w>
" Map nerdtree to <Leader>e
" Changes the pwd and opens the VCS root
" Placed here because ideavim doesn't understand :tcd
nnoremap <leader>e :tcd %:h<CR> :NERDTreeToggleVCS<CR>
" NERDTree Plugin configurations
let g:NERDTreeShowHidden = 1
let g:NERDTreeWinSize = 25