mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 19:45:25 +03:00
Mappings
This commit is contained in:
parent
b866f7de55
commit
b885ed7594
1 changed files with 25 additions and 8 deletions
|
|
@ -106,9 +106,9 @@ set mouse=a
|
||||||
set splitbelow
|
set splitbelow
|
||||||
set splitright
|
set splitright
|
||||||
|
|
||||||
map <C-n> :NERDTreeToggle<CR>
|
noremap <C-n> :NERDTreeToggle<CR>
|
||||||
nmap <S-Ins> "+p
|
nnoremap <S-Ins> "+p
|
||||||
map <C-m> :UndotreeToggle<CR>
|
noremap <C-m> :UndotreeToggle<CR>
|
||||||
|
|
||||||
noremap <silent> <ScrollWheelDown> :call comfortable_motion#flick(40)<CR>
|
noremap <silent> <ScrollWheelDown> :call comfortable_motion#flick(40)<CR>
|
||||||
noremap <silent> <ScrollWheelUp> :call comfortable_motion#flick(-40)<CR>
|
noremap <silent> <ScrollWheelUp> :call comfortable_motion#flick(-40)<CR>
|
||||||
|
|
@ -117,9 +117,11 @@ nnoremap <Tab> :TagbarToggle<CR>
|
||||||
"Splits
|
"Splits
|
||||||
|
|
||||||
"Other mappings
|
"Other mappings
|
||||||
nmap <C-p> :Files<CR>
|
nnoremap <C-p> :Files<CR>
|
||||||
:tnoremap <Esc> <C-\><C-n>
|
:tnoremap <Esc> <C-\><C-n>
|
||||||
nmap , :lclose<CR> :pclose<CR> :cclose<CR>
|
nnoremap , :lclose<CR> :pclose<CR> :cclose<CR>
|
||||||
|
noremap - ddkP
|
||||||
|
noremap _ ddp
|
||||||
|
|
||||||
"Snippets
|
"Snippets
|
||||||
let g:UltiSnipsUsePythonVersion = 3
|
let g:UltiSnipsUsePythonVersion = 3
|
||||||
|
|
@ -128,9 +130,14 @@ let g:UltiSnipsJumpForwardTrigger="<C-S-j>"
|
||||||
let g:UltiSnipsJumpBackwardTrigger=""
|
let g:UltiSnipsJumpBackwardTrigger=""
|
||||||
|
|
||||||
"Buffers and stuff
|
"Buffers and stuff
|
||||||
function! SubTerminal()
|
|
||||||
|
function! GetSubTerminalName()
|
||||||
let current_tabpage = tabpagenr()
|
let current_tabpage = tabpagenr()
|
||||||
let subterminal_name = current_tabpage . '_terminal'
|
return current_tabpage . '_terminal'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SubTerminal()
|
||||||
|
let subterminal_name = GetSubTerminalName()
|
||||||
let terminal_num = bufnr(subterminal_name)
|
let terminal_num = bufnr(subterminal_name)
|
||||||
if terminal_num == -1
|
if terminal_num == -1
|
||||||
execute ':new ' . subterminal_name
|
execute ':new ' . subterminal_name
|
||||||
|
|
@ -147,7 +154,17 @@ function! SubTerminal()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
nmap ` :call SubTerminal()<CR>
|
function! WipeSubTerminalBuffer()
|
||||||
|
let subterminal_name = GetSubTerminalName()
|
||||||
|
let terminal_num = bufnr(subterminal_name)
|
||||||
|
if terminal_num != -1
|
||||||
|
execute ':bwipeout! ' . terminal_num
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
autocmd BufWipeout term://* call WipeSubTerminalBuffer()
|
||||||
|
|
||||||
|
nnoremap ` :call SubTerminal()<CR>
|
||||||
|
|
||||||
|
|
||||||
"Formatting
|
"Formatting
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue