https://github.com/samwhelp/vim-plugin-switch-key-with-space-vim
vim-plugin-switch-key-with-space-vim
https://github.com/samwhelp/vim-plugin-switch-key-with-space-vim
space-vim vim vim-plugin
Last synced: about 2 months ago
JSON representation
vim-plugin-switch-key-with-space-vim
- Host: GitHub
- URL: https://github.com/samwhelp/vim-plugin-switch-key-with-space-vim
- Owner: samwhelp
- License: mit
- Created: 2019-04-07T04:34:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T09:46:55.000Z (about 5 years ago)
- Last Synced: 2025-02-08T20:12:27.653Z (3 months ago)
- Topics: space-vim, vim, vim-plugin
- Language: Vim script
- Homepage: https://github.com/liuchengxu/space-vim/issues/394
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-plugin-switch-key-with-space-vim
* vim-plugin-switch-key-with-space-vim ([GitHub](https://github.com/samwhelp/vim-plugin-switch-key-with-space-vim))
## Browse
* [My Map](#my-map)
* [Howto Install](#howto-install)## Introduction
This vim plugin is fit key map for my self with [space-vim](https://github.com/liuchengxu/space-vim).
## Orignal Map
* :help [normal-index](https://vimhelp.org/index.txt.html#normal-index)
* space-vim/layers/+distributions/better-defaults/[README.md](https://github.com/liuchengxu/space-vim/blob/master/layers/%2Bdistributions/better-defaults/README.md)
* space-vim/core/autoload/spacevim/map/[leader.vim](https://github.com/liuchengxu/space-vim/blob/master/core/autoload/spacevim/map/leader.vim)
* space-vim/core/autoload/spacevim/map/[localleader.vim](https://github.com/liuchengxu/space-vim/blob/master/core/autoload/spacevim/map/localleader.vim)
* space-vim/layers/+distributions/better-defaults/[keybindings.vim](https://github.com/liuchengxu/space-vim/blob/master/layers/%2Bdistributions/better-defaults/keybindings.vim)
* vim-better-default/plugin/[default.vim](https://github.com/liuchengxu/vim-better-default/blob/master/plugin/default.vim)
* ...## My Map
> Maybe not all. Just introduction. Please read [plugin/FitKey.vim](plugin/FitKey.vim) to find all key map.
> Just fit on Normal Mode
* [Quick Switch](#quick-switch)
* [Window Resize](#window-resize)
* [Delete Buffer](#delete-buffer)
* [Quit](#quit)
* [Hide](#hide)
* [Only](#only)
* [Buffer List](#buffer-list)
* [Save](#save)
* [TabPage](#tabpage)## Quick Switch
| Key | Map | Description |
| --- | --- | --- |
| `` | [C-w W](https://vimhelp.org/windows.txt.html#CTRL-W_W) | To Previous Window |
| `` | [C-w w](https://vimhelp.org/windows.txt.html#CTRL-W_w) | To Next Window |
| `` | [:bprevious](https://vimhelp.org/windows.txt.html#:bprevious)<CR> | To Previous Buffer |
| `` | [:bnext](https://vimhelp.org/windows.txt.html#:bnext)<CR> | To Next Buffer |
| `` | [:tabprevious](https://vimhelp.org/tabpage.txt.html#:tabprevious)<CR> | To Previous TabPage |
| `` | [:tabnext](https://vimhelp.org/tabpage.txt.html#:tabnext)<CR> | To Next TabPage |## Window Resize
| Key | Map |
| --- | --- |
| `` | [<C-w>-](https://vimhelp.org/windows.txt.html#CTRL-W_-) |
| `` | [<C-w>+](https://vimhelp.org/windows.txt.html#CTRL-W_+) |
| `` | [<C-w><](https://vimhelp.org/windows.txt.html#CTRL-W_<) |
| `` | [<C-w>>](https://vimhelp.org/windows.txt.html#CTRL-W_>) |## Delete Buffer
| Key | Map | Description | Notice |
| --- | --- | --- | --- |
| `,q` | [:bdelete](https://vimhelp.org/windows.txt.html#:bdelete)<CR> | delete current buffer | single |
| `,x` | [:%bdelete](https://vimhelp.org/windows.txt.html#:bdelete)<CR> | delete all buffer | all |
| `,z` | [:bdelete!](https://vimhelp.org/windows.txt.html#:bdelete)<CR> | force delete current buffer | single |
| `,c` | [:%bdelete!](https://vimhelp.org/windows.txt.html#:bdelete)<CR> | force delete all buffer | all |## Quit
| Key | Map | Description | Notice |
| --- | --- | --- | --- |
| `\q` | [:q](https://vimhelp.org/editing.txt.html#:q)<CR> | quit | single |
| `\x` | [:qa](https://vimhelp.org/editing.txt.html#:qa)<CR> | quit all | all |
| `\z` | [:q!](https://vimhelp.org/editing.txt.html#:q)<CR> | force quit | single |
| `\c` | [:qa!](https://vimhelp.org/editing.txt.html#:qa)<CR> | force quit all | all |> Please read :help ['confirm'](https://vimhelp.org/options.txt.html#'confirm').
## Hide
| Key | Map | Description | Notice |
| --- | --- | --- | --- |
| `,h` | [:hide](https://vimhelp.org/windows.txt.html#:hide)<CR> | hide current buffer | single |## Only
| Key | Map | Description |
| --- | --- | --- |
| `,wa` | [:only](https://vimhelp.org/windows.txt.html#:only)<CR> | to close other window, then all buffer will hide, if set [hidden](https://vimhelp.org/options.txt.html#'hidden'). |
| `wa` | [:tabonly](https://vimhelp.org/tabpage.txt.html#:tabonly)<CR> | wa to close other tabpage, then all buffer will hide, if set [hidden](https://vimhelp.org/options.txt.html#'hidden'). |> Compare with `,x`, `,c`, `\x`, `\c`, `,h`。
## Buffer List
| Key | Map | Description |
| --- | --- | --- |
| `,b` | [:ls](https://vimhelp.org/windows.txt.html#:ls)<CR> | Show all buffers. |> space-vim Use `bb` can list and chose
## Save
| Key | Map | Description | Notice |
| --- | --- | --- | --- |
| `` | [:w](https://vimhelp.org/editing.txt.html#:w)<CR> | Write the whole buffer to the current file. | Work on Normal Mode and Insert Mode |> space-vim Use `fs` bind [:update](https://vimhelp.org/editing.txt.html#:update)<CR> .
> sapce-vim Use `` [bind](https://github.com/liuchengxu/space-vim/blob/master/layers/%2Bdistributions/better-defaults/keybindings.vim#L9) [:bp](https://vimhelp.org/windows.txt.html#:bp)<CR> .
## TabPage
| Key | Map | Description |
| --- | --- | --- |
| `s` | [:tab split](https://vimhelp.org/tabpage.txt.html#:tab)<CR> | Opens current buffer in new tab page |
| `t` | [:tabnew](https://vimhelp.org/tabpage.txt.html#:tabnew)<CR> | New TabPage |
| `f` | [:tabnew](https://vimhelp.org/tabpage.txt.html#:tabnew)<CR>[:edit](https://vimhelp.org/editing.txt.html#:edit)<Space> | New tabpage and wait for user input file path |
| `e` | [:tabedit](https://vimhelp.org/tabpage.txt.html#:tabedit)<Space> | Edit file on new tabpage) |> I use [t](https://github.com/samwhelp/tool-svim-core/blob/master/plugin/Svim.vim#L745) for tabpage. space-vim use `` for tabpage. It's ok.
## My Environment
* ubuntu 18.04
* lxqt 25
* xfwm4 4.12.4
* gnome-terminal 3.28.2
* qterminal 0.8.0
* vim 8.0
* nvim 0.2.2## Related Projects
* [vim-plugin-switch-key-raw-with-space-vim](https://github.com/samwhelp/vim-plugin-switch-key-raw-with-space-vim)
## Howto Install
### Install space-vim
Please install [space-vim](https://github.com/liuchengxu/space-vim) first!
Then config. Just one line.
``` vim
Plug 'samwhelp/vim-plugin-switch-key-with-space-vim'
```### Config ~/.spacevim
You can edit 「[~/.spacevim](https://github.com/liuchengxu/space-vim/blob/master/init.spacevim#L30)」like this.
``` vim
function! UserInit()
Plug 'samwhelp/vim-plugin-switch-key-with-space-vim'
endfunction
```### :PlugInstall
you can run [vim](http://manpages.ubuntu.com/manpages/bionic/en/man1/vim.1.html) or [nvim](http://manpages.ubuntu.com/manpages/bionic/en/man1/nvim.1.html), then run [:PlugInstall](https://github.com/junegunn/vim-plug#commands).
or just run on shell.
``` sh
$ vim -nNRe -c 'try | :PlugInstall | finally | :qa! | entry'
```or not quit, run
``` sh
$ vim -nNRe -c ':PlugInstall'
```It's done.
or can run
``` sh
$ vim -nNRe +PlugInstall +qa!
```or can run
``` sh
$ vim -nNRe +PlugInstall
```