2020-05-11 01:23:44 +02:00
|
|
|
" g Leader key
|
2020-05-09 06:36:34 +02:00
|
|
|
let mapleader=" "
|
2020-05-10 22:20:02 +02:00
|
|
|
" let localleader=" "
|
2020-05-09 06:36:34 +02:00
|
|
|
nnoremap <Space> <Nop>
|
2020-04-28 03:58:30 +02:00
|
|
|
|
2020-04-29 05:34:21 +02:00
|
|
|
" Better indenting
|
|
|
|
vnoremap < <gv
|
|
|
|
vnoremap > >gv
|
|
|
|
|
|
|
|
if exists('g:vscode')
|
|
|
|
|
|
|
|
" Simulate same TAB behavior in VSCode
|
|
|
|
nmap <Tab> :Tabnext<CR>
|
|
|
|
nmap <S-Tab> :Tabprev<CR>
|
|
|
|
|
|
|
|
else
|
2020-04-28 03:58:30 +02:00
|
|
|
" Better nav for omnicomplete
|
|
|
|
inoremap <expr> <c-j> ("\<C-n>")
|
|
|
|
inoremap <expr> <c-k> ("\<C-p>")
|
|
|
|
|
|
|
|
" I hate escape more than anything else
|
|
|
|
inoremap jk <Esc>
|
|
|
|
inoremap kj <Esc>
|
|
|
|
|
|
|
|
" Easy CAPS
|
|
|
|
" inoremap <c-u> <ESC>viwUi
|
|
|
|
" nnoremap <c-u> viwU<Esc>
|
|
|
|
|
|
|
|
" TAB in general mode will move to text buffer
|
|
|
|
nnoremap <TAB> :bnext<CR>
|
|
|
|
" SHIFT-TAB will go back
|
|
|
|
nnoremap <S-TAB> :bprevious<CR>
|
|
|
|
|
|
|
|
" Alternate way to save
|
|
|
|
nnoremap <C-s> :w<CR>
|
|
|
|
" Alternate way to quit
|
|
|
|
nnoremap <C-Q> :wq!<CR>
|
|
|
|
" Use control-c instead of escape
|
|
|
|
nnoremap <C-c> <Esc>
|
|
|
|
" <TAB>: completion.
|
|
|
|
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
|
|
|
|
|
|
|
|
|
|
|
" Better window navigation
|
|
|
|
nnoremap <C-h> <C-w>h
|
|
|
|
nnoremap <C-j> <C-w>j
|
|
|
|
nnoremap <C-k> <C-w>k
|
|
|
|
nnoremap <C-l> <C-w>l
|
|
|
|
|
|
|
|
" Use alt + hjkl to resize windows
|
|
|
|
nnoremap <M-j> :resize -2<CR>
|
|
|
|
nnoremap <M-k> :resize +2<CR>
|
|
|
|
nnoremap <M-h> :vertical resize -2<CR>
|
|
|
|
nnoremap <M-l> :vertical resize +2<CR>
|
|
|
|
endif
|
2020-04-24 21:29:55 +02:00
|
|
|
|