Skip to content

Commit fdf7da0

Browse files
committed
vuvista
1 parent c8749ea commit fdf7da0

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

.vim/init.vim

+20-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@
4747
" <F10> - toggle compile error window (equivalent to :QFix)
4848
" <F12> - search for required-from-here (useful for errors)
4949
"
50+
" <C-t> - toggle built-in terminal
5051
" <C-\> - enter normal mode in terminal (to select text)
52+
" i or a - get back to insert mode in terminal
53+
" <C-w> w - switch out of terminal window (back to editor)
54+
" <C-w> "" - paste from vim clipboard to terminal
5155
"
5256
"
5357
" Build and Run
@@ -241,7 +245,14 @@
241245
"
242246
" <C-J> - select next fuzzy candidate (in fuzzy find window)
243247
" <C-K> - select previous fuzzy candidate (in fuzzy find window)
244-
" <C-P> - peek the current selected candidate (in fuzzy find window)
248+
" <CR> - open current selected candidate (double click will work too)
249+
" <TAB> - switch between normal mode / insert mode (in fuzzy find window)
250+
" p - peek the current selected candidate in popup window
251+
" v - open current selected candidate in vertical splitted window
252+
" x - open current selected candidate in horizontal splitted window
253+
" Q - add current selected candidate to quickfix list
254+
" L - add current selected candidate to location list
255+
" d - delete current selected candidate
245256
"
246257

247258
set nocompatible
@@ -259,7 +270,7 @@ set showbreak=↪
259270
set list
260271
"set noek
261272
"set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)
262-
set switchbuf=usetab
273+
"set switchbuf=usetab
263274
set undofile
264275
if has('nvim')
265276
set undodir=/tmp/nvim//,.
@@ -300,7 +311,7 @@ else
300311
nnoremap <S-F7> :AsyncTask project-config<CR>
301312
endif
302313
nnoremap <silent> <F8> :wa<CR>:sh<CR><CR>
303-
nnoremap <silent> <F9> :wa<CR>:NERDTreeToggle<CR><C-w>l
314+
nnoremap <silent> <F9> :wa<CR>:NERDTreeToggle<CR><C-w>l:Vista!!<CR><C-w>h
304315
nnoremap <silent> <F10> :wa<CR>:QFix<CR>
305316
nnoremap <silent> <F12> /required from here<CR>
306317
"nnoremap <silent> <C-k> <C-w>k:q<CR>
@@ -320,9 +331,11 @@ vnoremap L $
320331
"vnoremap z zz
321332
"nnoremap <CR> O<ESC>cc<ESC>j
322333

323-
"nnoremap <silent> <C-t> :botright terminal<CR>
324-
"tnoremap <C-t> <C-w>q
325-
"tnoremap <C-\> <C-\><C-n>
334+
tnoremap <C-\> <C-\><C-n>
335+
if !has('nvim')
336+
tnoremap <ScrollWheelUp> <C-\><C-n><ScrollWheelUp>
337+
tnoremap <ScrollWheelDown> <C-\><C-n><ScrollWheelDown>
338+
endif
326339

327340
vnoremap Z :w !xsel -ib<CR><CR>
328341
" MacOS user should use this:
@@ -817,7 +830,7 @@ Plug 'haya14busa/incsearch.vim'
817830
Plug 'voldikss/vim-floaterm'
818831
Plug 'findango/vim-mdx', {'for': 'mdx'}
819832
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
820-
"Plug 'liuchengxu/vista.vim', {'on': 'Vista'}
833+
Plug 'liuchengxu/vista.vim', {'on': 'Vista!!'}
821834

822835
call plug#end()
823836

src/install.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ install_coc_plugins() {
107107
set -e
108108
pushd ~/
109109
110-
echo -e '\\n\\nZZZZ\\n\\n' | "$VIMEXE" --not-a-term -c "set mouse= | echo 'installing all Vim plugins, please wait...' | PlugInstall | echo 'done' | quit"
110+
echo -e '\\n\\nZZZZ\\n\\n' | "$VIMEXE" -c "set mouse= | echo 'installing all Vim plugins, please wait...' | PlugInstall | echo 'done' | quit"
111111
for x in coc-ccls coc-pyright coc-git coc-json; do
112112
echo "-- Installing coc plugin '\$x', please wait..."
113-
echo -e '\\n\\nZZZZ\\n\\n' | "$VIMEXE" --not-a-term -c "set mouse= | echo 'installing \$x, please wait...' | CocInstall -sync \$x | echo 'done' | quit"
113+
echo -e '\\n\\nZZZZ\\n\\n' | "$VIMEXE" -c "set mouse= | echo 'installing \$x, please wait...' | CocInstall -sync \$x | echo 'done' | quit"
114114
done
115115
116116
mkdir -p ~/.config/coc/extensions/node_modules/coc-ccls

0 commit comments

Comments
 (0)