forked from operatorofhell/vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mappings.vim
43 lines (34 loc) · 1.02 KB
/
mappings.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
""
" mappings
"
let mapleader = 'ö'
"moving lines up and down
nmap <silent> <C-k> :,m.-2<CR>
nmap <silent> <C-j> :,m.+1<CR>
imap <silent> <C-k> <esc>:,m.-2<CR>i
imap <silent> <C-j> <esc>:,m.+1<CR>i
nmap <silent> <leader>th :call ToggleHUD()<CR>
nmap <silent> <leader>tl :set list!<CR>
nmap <silent> <leader>tn :NERDTreeToggle<CR>
nmap <silent> <leader>tp :set paste!<CR>
nmap <silent> <leader>ts :call ToggleSyntax()<CR>
nmap <silent> <leader>tw :set wrap!<CR>
nmap <silent> <leader>tr :set spell!<CR>
nnoremap <leader>ef :vsplit ~/.vim/functions.vim<CR>
nnoremap <leader>er :vsplit $MYVIMRC<CR>
nnoremap <leader>em :vsplit ~/.vim/mappings.vim<CR>
nnoremap <leader>ep :vsplit ~/.vim/plugins.vim<CR>
" buffer navigation
nmap <leader>bk :bnext<CR>
nmap <leader>bj :prev<CR>
" highlighting
nmap <silent> <leader>hs :call ToggleSyntax()<CR>
" search
nnoremap <leader>sh :set hlsearch!<CR>
inoremap jk <esc>
vnoremap jk <esc>
" don't jump over wrapped lines
noremap j gj
noremap k gk
nnoremap <C-h> :bprev<CR>
nnoremap <C-l> :bnext<CR>