https://github.com/aben20807/vim-surrounder
A simple Vim plugin which to add surround symbols.
https://github.com/aben20807/vim-surrounder
surround vim vim-plugin
Last synced: 7 months ago
JSON representation
A simple Vim plugin which to add surround symbols.
- Host: GitHub
- URL: https://github.com/aben20807/vim-surrounder
- Owner: aben20807
- License: mit
- Created: 2018-01-28T14:59:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-01T01:02:01.000Z (almost 7 years ago)
- Last Synced: 2025-01-16T19:22:40.712Z (9 months ago)
- Topics: surround, vim, vim-plugin
- Language: Vim script
- Homepage: https://aben20807.blogspot.tw/2018/03/1070313-vim-surrounder.html
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Surrounder
## 1. Installation
### 1.a. Installation with [Vim-Plug](https://github.com/junegunn/vim-plug)
1. Add `Plug 'aben20807/vim-surrounder'` to your vimrc file.
2. Reload your vimrc or restart.
3. Run `:PlugInstall`### 1.b. Installation with [Vundle](https://github.com/VundleVim/Vundle.vim)
1. Add `Plugin 'aben20807/vim-surrounder'` to your vimrc file.
2. Reload your vimrc or restart
3. Run `:PluginInstall`## 2. Usage
### 2.a. Supported symbols
+ '', "", (), [], {}, <>### 2.b. Demonstration
+ Note: ` ` marked text is cursor position.|Before|key pressed|After|
|:-:|:-:|:-:|
|h`e`llo world | `s "` | "h`e`llo" world|
|h`e`llo world | `2s "` | "h`e`llo world"|+ Use auto detect
|Before|key pressed|After|
|:-:|:-:|:-:|
|"h`e`llo world" | `d` | h`e`llo world|
|"h`e`llo world" | `f (` | (h`e`llo world)|+ Not use auto detect
|Before|key pressed|After|
|:-:|:-:|:-:|
|"h`e`llo world" | `d "` | h`e`llo world|
|"h`e`llo world" | `f "(` | (h`e`llo world)|### 2.c. Settings
```vim
" Feel free to change mapping you like.
" Use key mappings setting from this plugin by default.
let g:surrounder_use_default_mapping = 1" Add surround in n mode
let g:surrounder_n_add_key = "s"" Add surround in v mode
let g:surrounder_v_add_key = "s"" Delete surround in n mode
let g:surrounder_n_del_key = "d"" Replace surround in n mode
let g:surrounder_n_rep_key = "f"" Show the surround information by default.
let g:surrounder_show_info = 1" Auto detect if in surround symbols by default.
let g:surrounder_auto_detect = 1
```