reconfiguration of toggles and quickui
This commit is contained in:
67
vim/.vimrc
67
vim/.vimrc
@ -88,8 +88,13 @@
|
|||||||
let word = expand('<cword>')
|
let word = expand('<cword>')
|
||||||
let cmd = ":silent !"
|
let cmd = ":silent !"
|
||||||
|
|
||||||
|
if &filetype == "vim"
|
||||||
|
:help word
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
if &filetype == "cpp"
|
if &filetype == "cpp"
|
||||||
let cmd .= "man 3 " . word . "; [ $? == 16 ] && cppman "
|
let cmd .= "man -s 3,2 " . word . "; [ $? == 16 ] && cppman "
|
||||||
elseif &filetype == "python"
|
elseif &filetype == "python"
|
||||||
let cmd .= "pydoc "
|
let cmd .= "pydoc "
|
||||||
else
|
else
|
||||||
@ -114,8 +119,10 @@
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:drawit_boolean = 0
|
|
||||||
function! Drawit_toggle()
|
function! Drawit_toggle()
|
||||||
|
if !exists("s:drawit_boolean")
|
||||||
|
let s:drawit_boolean = 0
|
||||||
|
endif
|
||||||
if s:drawit_boolean
|
if s:drawit_boolean
|
||||||
DIstop
|
DIstop
|
||||||
let s:drawit_boolean = 0
|
let s:drawit_boolean = 0
|
||||||
@ -125,25 +132,30 @@
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:acp_boolean = 0
|
function! Programming_mode_toggle()
|
||||||
function! Acp_toggle()
|
if !exists("s:programming_mode_boolean")
|
||||||
if s:drawit_boolean
|
let s:programming_mode_boolean = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if s:programming_mode_boolean
|
||||||
|
let s:programming_mode_boolean = 0
|
||||||
AcpDisable
|
AcpDisable
|
||||||
let s:drawit_boolean = 0
|
|
||||||
else
|
else
|
||||||
|
let s:programming_mode_boolean = 1
|
||||||
AcpEnable
|
AcpEnable
|
||||||
let s:drawit_boolean = 1
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:spell_boolean = 0
|
|
||||||
function! Spell_toggle()
|
function! Spell_toggle()
|
||||||
if s:drawit_boolean
|
if !exists("s:spell_boolean")
|
||||||
|
let s:spell_boolean = 0
|
||||||
|
endif
|
||||||
|
if s:spell_boolean
|
||||||
set nospell
|
set nospell
|
||||||
let s:drawit_boolean = 0
|
let s:spell_boolean = 0
|
||||||
else
|
else
|
||||||
set spell spelllang=en_us
|
set spell spelllang=en_us
|
||||||
let s:drawit_boolean = 1
|
let s:spell_boolean = 1
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -160,6 +172,7 @@
|
|||||||
inoremap <expr> <CR> pumvisible() ? "\<C-g>u\<CR>" : "\<C-g>u\<CR>"
|
inoremap <expr> <CR> pumvisible() ? "\<C-g>u\<CR>" : "\<C-g>u\<CR>"
|
||||||
inoremap <expr> <C-j> pumvisible() ? "\<C-N>" : "<C-j>"
|
inoremap <expr> <C-j> pumvisible() ? "\<C-N>" : "<C-j>"
|
||||||
inoremap <expr> <C-k> pumvisible() ? "\<C-P>" : "<C-k>"
|
inoremap <expr> <C-k> pumvisible() ? "\<C-P>" : "<C-k>"
|
||||||
|
|
||||||
" Function_keys:
|
" Function_keys:
|
||||||
" ### Visibility island
|
" ### Visibility island
|
||||||
" F1: toggle whitespace visibility
|
" F1: toggle whitespace visibility
|
||||||
@ -170,29 +183,35 @@
|
|||||||
map <F3> :call Signcolumn_toggle()<CR>
|
map <F3> :call Signcolumn_toggle()<CR>
|
||||||
" F4: unhighligh highlighted text
|
" F4: unhighligh highlighted text
|
||||||
map <F4> :noh<CR>
|
map <F4> :noh<CR>
|
||||||
|
|
||||||
" ### Feature island
|
" ### Feature island
|
||||||
" F5: toggle spell check
|
" F5: Display Turbo Menu
|
||||||
"map <F5> :!aspell check %<CR>:e! %<CR>
|
map <F5> :call quickui#menu#open()<CR>
|
||||||
map <F5> :call Spell_toggle()<CR>
|
" F6: compile with bake
|
||||||
" F6: reload ctags and its highlighting
|
map <f6> :!bake %:p<CR>
|
||||||
map <f6> :call Cpp_tags_run()<CR>
|
" F7:
|
||||||
" F7: toggle DrawIt plugin mode
|
" NOTHING YET
|
||||||
map <F7> :call Drawit_toggle()<CR>
|
|
||||||
" F8: toggle acp (auto suggest) plugin mode
|
" F8: toggle acp (auto suggest) plugin mode
|
||||||
map <F8> :call Acp_toggle()<CR>
|
map <F8> :call Programming_mode_toggle()<CR>
|
||||||
|
|
||||||
" ### Call once in a while island
|
" ### Call once in a while island
|
||||||
" F9: copy file contents to clipboard
|
" F9: copy file contents to clipboard
|
||||||
map <F9> miggVG"+y'izz
|
map <F9> miggVG"+y'izz
|
||||||
|
" F10:
|
||||||
|
" NOTHING YET
|
||||||
|
" F11:
|
||||||
|
" NOTHING YET
|
||||||
" F12: reload file
|
" F12: reload file
|
||||||
map <F12> :e!<CR>
|
map <F12> :e!<CR>
|
||||||
|
|
||||||
" Tagbar_plugin:
|
" Tagbar_plugin:
|
||||||
nmap <C-W>m :TagbarToggle<CR>
|
nmap <C-W>m :TagbarToggle<CR>
|
||||||
|
|
||||||
"------------------
|
"------------------
|
||||||
" ### VARIABLES ###
|
" ### VARIABLES ###
|
||||||
"------------------
|
"------------------
|
||||||
let $BASH_ENV = "/home/jacob/Desktop/minecraft mod/Linux/Vim/bash_aliases"
|
|
||||||
let g:hitags_events = ["BufWrite"]
|
let g:hitags_events = ["BufWrite"]
|
||||||
|
let g:sigs_events = ["BufWrite"]
|
||||||
|
|
||||||
" -------------
|
" -------------
|
||||||
" ### NETRW ###
|
" ### NETRW ###
|
||||||
@ -244,3 +263,11 @@ endif
|
|||||||
"source ~/.vimrc9
|
"source ~/.vimrc9
|
||||||
|
|
||||||
set formatoptions-=cro
|
set formatoptions-=cro
|
||||||
|
|
||||||
|
" TEMP:
|
||||||
|
highlight DiffChange ctermbg=3
|
||||||
|
|
||||||
|
" AI notes:
|
||||||
|
" <C-W>v<C-W>l
|
||||||
|
" :new
|
||||||
|
" :windo diffthis
|
||||||
|
Reference in New Issue
Block a user