48 lines
1.2 KiB
VimL
48 lines
1.2 KiB
VimL
let g:mapleader = ' '
|
|
|
|
set splitbelow splitright
|
|
set expandtab tabstop=4 shiftwidth=4
|
|
set incsearch smartcase nohlsearch
|
|
set swapfile directory=~/.vim/swap//
|
|
set undofile undodir=~/.vim/undo//
|
|
|
|
nnoremap j jzz
|
|
nnoremap k kzz
|
|
nnoremap gg ggzz
|
|
nnoremap G Gzz
|
|
|
|
nnoremap <silent> <leader>h :wincmd h<CR>
|
|
nnoremap <silent> <leader>j :wincmd j<CR>
|
|
nnoremap <silent> <leader>k :wincmd k<CR>
|
|
nnoremap <silent> <leader>l :wincmd l<CR>
|
|
|
|
nnoremap <silent> <Up> :resize +3<CR>
|
|
nnoremap <silent> <Down> :resize -3<CR>
|
|
nnoremap <silent> <Right> :vertical resize +3<CR>
|
|
nnoremap <silent> <Left> :vertical resize -3<CR>
|
|
|
|
inoremap jk <Esc>
|
|
inoremap <Esc> <nop>
|
|
|
|
nnoremap <leader>a <C-^>
|
|
|
|
tnoremap <silent> jk <C-\><C-n>
|
|
|
|
nnoremap <silent> <leader>rr :terminal<CR>
|
|
nnoremap <silent> <leader>rh :vsp<CR>:wincmd h<CR>:term<CR>
|
|
nnoremap <silent> <leader>rl :vsp<CR>:term<CR>
|
|
nnoremap <silent> <leader>rk :sp<CR>:wincmd k<CR>:term<CR>
|
|
nnoremap <silent> <leader>rj :sp<CR>:term<CR>
|
|
|
|
function! ToggleLineNumbers()
|
|
if &number
|
|
set nonumber
|
|
set norelativenumber
|
|
else
|
|
set number
|
|
set relativenumber
|
|
endif
|
|
endfunction
|
|
|
|
nnoremap <silent> <leader>L :call ToggleLineNumbers()<CR>
|