aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/stargate.vim
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-09-27 15:20:32 +0800
committerGuangxiong Lin <[email protected]>2022-09-27 15:20:49 +0800
commit1052ab892de47976c4f6dabed2b8798c02256d56 (patch)
tree3fdcb79b1e74b64c6c4452c1b44d3de1d6214d6a /.vim/after/plugin/stargate.vim
parente324531cefff20d2310f25be6d8cae82fb053554 (diff)
downloaddotfiles-1052ab892de47976c4f6dabed2b8798c02256d56.tar.gz
dotfiles-1052ab892de47976c4f6dabed2b8798c02256d56.tar.bz2
dotfiles-1052ab892de47976c4f6dabed2b8798c02256d56.zip
Try vim9-stargate
Diffstat (limited to '.vim/after/plugin/stargate.vim')
-rw-r--r--.vim/after/plugin/stargate.vim29
1 files changed, 29 insertions, 0 deletions
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 <space>f <Cmd>call stargate#OKvim(2)<CR>
+
+" start of a word
+noremap <space>w <Cmd>call stargate#OKvim('\<')<CR>
+
+" for the end of a word
+noremap <space>e <Cmd>call stargate#OKvim('\S\>')<CR>
+
+" for the start of a line
+noremap <space>l <Cmd>call stargate#OKvim('\_^')<CR>
+
+" for the last character on the line
+noremap <space>E <Cmd>call stargate#OKvim('\S\s*$')<CR>
+
+" for the end of a line
+noremap <space>$ <Cmd>call stargate#OKvim('$')<CR>
+
+" for any bracket, parentheses or curly bracket
+noremap <space>[ <Cmd>call stargate#OKvim('[(){}[\]]')<CR>
+
+" switch window
+nnoremap <space>W <Cmd>call stargate#Galaxy()<CR>