Browse Source
keybindings: added toggleterm with F keys
my-config
NTBBloodbath
4 years ago
No known key found for this signature in database
GPG Key ID: 18D6730BC846AAC5
3 changed files with
20 additions and
15 deletions
-
autoload/doom/functions.vim
-
config/keybindings.vim
-
config/plugins/leader-mapper.vim
|
|
@ -22,6 +22,13 @@ function! doom#functions#get_root() abort |
|
|
|
return root |
|
|
|
endfunction |
|
|
|
|
|
|
|
" ToggleTerm custom function to avoid having |
|
|
|
" line numbers inside the terminal buffer |
|
|
|
" because that is not from God. |
|
|
|
function! doom#functions#toggle_terminal() abort |
|
|
|
execute "ToggleTerm" |
|
|
|
set nonumber norelativenumber |
|
|
|
endfunction |
|
|
|
|
|
|
|
function! doom#functions#quit_doom(write, force) abort |
|
|
|
try |
|
|
|
|
|
@ -22,9 +22,10 @@ let g:mapleader = " " |
|
|
|
" ESC = Search highlighting off " |
|
|
|
" F2 = Toggle Tagbar " |
|
|
|
" F3 = Toggle Tree Explorer " |
|
|
|
" F4 = Toggle Minimap " |
|
|
|
" F5 = Toggle distraction-free " |
|
|
|
" F6 = Run dot-http " |
|
|
|
" F4 = Toggle Terminal " |
|
|
|
" F5 = Toggle Minimap " |
|
|
|
" F6 = Toggle distraction-free " |
|
|
|
" F7 = Run dot-http " |
|
|
|
" " |
|
|
|
"========================================" |
|
|
|
|
|
|
@ -58,14 +59,18 @@ endif |
|
|
|
if index(g:doom_disabled_plugins, 'tree') == -1 |
|
|
|
nnoremap <F3> :NvimTreeToggle<CR> |
|
|
|
endif |
|
|
|
if index(g:doom_disabled_plugins, 'terminal') == -1 |
|
|
|
nnoremap <F4> :call doom#functions#toggle_terminal()<CR> |
|
|
|
endif |
|
|
|
if index(g:doom_disabled_plugins, 'minimap') == -1 |
|
|
|
nnoremap <F4> :MinimapToggle<CR> |
|
|
|
nnoremap <F5> :MinimapToggle<CR> |
|
|
|
endif |
|
|
|
if index(g:doom_disabled_plugins, 'goyo') == -1 |
|
|
|
nnoremap <F5> :Goyo<CR> |
|
|
|
nnoremap <F6> :Goyo<CR> |
|
|
|
endif |
|
|
|
if index(g:doom_disabled_modules, 'web') == -1 |
|
|
|
nnoremap <F6> :DotHttp<CR> |
|
|
|
if index(g:doom_disabled_modules, 'web') == -1 \ |
|
|
|
&& index(g:doom_disabled_plugins, 'restclient') == -1 |
|
|
|
nnoremap <F7> :DotHttp<CR> |
|
|
|
endif |
|
|
|
|
|
|
|
"=====================" |
|
|
|
|
|
@ -204,13 +204,6 @@ function ToggleNumbers() |
|
|
|
set number! |
|
|
|
endif |
|
|
|
endfunction |
|
|
|
" ToggleTerm custom function to avoid having |
|
|
|
" line numbers inside the terminal buffer |
|
|
|
" because that is not from God. |
|
|
|
function ToggleTerm() |
|
|
|
execute "ToggleTerm" |
|
|
|
set nonumber norelativenumber |
|
|
|
endfunction |
|
|
|
" Toggle Menu |
|
|
|
let g:lmap.t = {'name': 'Toggler Menu'} |
|
|
|
" Toggle Line Numbers |
|
|
@ -239,7 +232,7 @@ if index(g:doom_disabled_plugins, 'vista') == -1 |
|
|
|
endif |
|
|
|
if index(g:doom_disabled_plugins, 'toggleterm') == -1 |
|
|
|
" Open a new terminal |
|
|
|
nnoremap <leader>tt :call ToggleTerm()<CR> |
|
|
|
nnoremap <leader>tt :call doom#functions#toggle_terminal()<CR> |
|
|
|
let g:lmap.t.t = 'Toggle terminal' |
|
|
|
endif |
|
|
|
|
|
|
|