From 1052ab892de47976c4f6dabed2b8798c02256d56 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 27 Sep 2022 15:20:32 +0800 Subject: Try vim9-stargate --- .vim/after/plugin/easymotion.vim | 76 ++++++++++++++++++++-------------------- .vim/after/plugin/minpac.vim | 3 +- .vim/after/plugin/stargate.vim | 29 +++++++++++++++ 3 files changed, 69 insertions(+), 39 deletions(-) create mode 100644 .vim/after/plugin/stargate.vim (limited to '.vim/after') diff --git a/.vim/after/plugin/easymotion.vim b/.vim/after/plugin/easymotion.vim index 753b871..cd50666 100644 --- a/.vim/after/plugin/easymotion.vim +++ b/.vim/after/plugin/easymotion.vim @@ -1,38 +1,38 @@ -let g:EasyMotion_do_mapping = 0 -let g:EasyMotion_smartcase = 1 -let g:EasyMotion_smartsign_us = 1 -" let g:EasyMotion_startofline = 0 - -map j (easymotion-j) -nmap j (easymotion-j) - -map k (easymotion-k) -nmap k (easymotion-k) - -map l (easymotion-lineforward) -nmap l (easymotion-lineforward) - -map h (easymotion-linebackward) -nmap h (easymotion-linebackward) - -map (easymotion-bd-jk) -nmap (easymotion-overwin-line) - -map n (easymotion-bd-n) -nmap n (easymotion-bd-n) - -map w (easymotion-bd-w) -nmap w (easymotion-overwin-w) - -map e (easymotion-bd-e) -nmap e (easymotion-bd-e) - -map f (easymotion-bd-f) -nmap f (easymotion-overwin-f) - -map s (easymotion-bd-f2) -nmap s (easymotion-overwin-f2) - -nmap / (easymotion-bd-fn) - -nmap ; (easymotion-repeat) +" let g:EasyMotion_do_mapping = 0 +" let g:EasyMotion_smartcase = 1 +" let g:EasyMotion_smartsign_us = 1 +" " let g:EasyMotion_startofline = 0 +" +" map j (easymotion-j) +" nmap j (easymotion-j) +" +" map k (easymotion-k) +" nmap k (easymotion-k) +" +" map l (easymotion-lineforward) +" nmap l (easymotion-lineforward) +" +" map h (easymotion-linebackward) +" nmap h (easymotion-linebackward) +" +" map (easymotion-bd-jk) +" nmap (easymotion-overwin-line) +" +" map n (easymotion-bd-n) +" nmap n (easymotion-bd-n) +" +" map w (easymotion-bd-w) +" nmap w (easymotion-overwin-w) +" +" map e (easymotion-bd-e) +" nmap e (easymotion-bd-e) +" +" map f (easymotion-bd-f) +" nmap f (easymotion-overwin-f) +" +" map s (easymotion-bd-f2) +" nmap s (easymotion-overwin-f2) +" +" nmap / (easymotion-bd-fn) +" +" nmap ; (easymotion-repeat) diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index 4adf566..a5d28a1 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -30,6 +30,7 @@ function! InitMinpac() abort call minpac#add('https://github.com/rhysd/vim-lsp-ale.git', {'type': 'opt'}) call minpac#add('https://github.com/andymass/vim-matchup.git', {'type': 'start'}) + call minpac#add('https://github.com/monkoose/vim9-stargate.git', {'type': 'opt'}) if has('nvim') call minpac#add('https://github.com/nvim-lua/plenary.nvim', {'type': 'opt'}) @@ -66,7 +67,7 @@ function! InitMinpac() abort call minpac#add('https://github.com/prabirshrestha/asyncomplete-buffer.vim.git', {'type': 'opt'}) call minpac#add('https://github.com/ludovicchabant/vim-gutentags.git', {'type': 'opt'}) - call minpac#add('https://github.com/easymotion/vim-easymotion.git') + " call minpac#add('https://github.com/easymotion/vim-easymotion.git') call minpac#add('https://github.com/airblade/vim-rooter.git') call minpac#add('https://github.com/mbbill/undotree.git') call minpac#add('https://github.com/godlygeek/tabular.git') diff --git a/.vim/after/plugin/stargate.vim b/.vim/after/plugin/stargate.vim new file mode 100644 index 0000000..51444a5 --- /dev/null +++ b/.vim/after/plugin/stargate.vim @@ -0,0 +1,29 @@ +if has('nvim') | finish | endif + +let g:stargate_name = 'Master' + +packadd vim9-stargate + +" search two characters +noremap f call stargate#OKvim(2) + +" start of a word +noremap w call stargate#OKvim('\<') + +" for the end of a word +noremap e call stargate#OKvim('\S\>') + +" for the start of a line +noremap l call stargate#OKvim('\_^') + +" for the last character on the line +noremap E call stargate#OKvim('\S\s*$') + +" for the end of a line +noremap $ call stargate#OKvim('$') + +" for any bracket, parentheses or curly bracket +noremap [ call stargate#OKvim('[(){}[\]]') + +" switch window +nnoremap W call stargate#Galaxy() -- cgit v1.2.3