dotfiles/home/.config/nvim/conf.d/03-keybinds.vim

40 lines
730 B
VimL
Raw Normal View History

" Change leader to space
nnoremap <SPACE> <Nop>
let mapleader = ' '
" Toggle nerdtree
map <silent> <C-t> :NERDTreeToggle<CR>
" Markdown preview
nmap <C-s> <Plug>MarkdownPreview
nmap <M-s> <Plug>MarkdownPreviewStop
nmap <C-p> <Plug>MarkdownPreviewToggle
set splitbelow
set splitright
" Move between buffers
nnoremap <C-N> :bn<CR>
nnoremap <C-B> :bp<CR>
" Move between splits
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable mouse
set mouse=a
2020-01-21 18:32:47 +02:00
" Toggle equalalways
function ToggleEqual ()
:set equalalways!
:set equalalways!
endfunction
nnoremap <leader>= :call ToggleEqual()<CR>
2020-03-05 21:28:10 +02:00
" Navigate display lines insted of physical lines
nnoremap j gj
nnoremap k gk