- Notifications
You must be signed in to change notification settings - Fork108
PegasusWang/vim-config
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Lean mean Neo/vim machine, 30-45ms startup time.
Best withNeovim 0.5.x orVim 8.x andpython3 enabled.
I encourage you to fork this repo and create your own experience.Learn how to tweak and change Neo/vim to the way YOU like it.This is my cultivation of years of tweaking, use it as a git remoteand stay in-touch with upstream for reference or cherry-picking.
Table of Contents(🔎 Click to expand/collapse)
- Fast startup time
- Robust, yet light-weight
- Lazy-load 95% of plugins withShougo/dein.vim
- Custom side-menu (try it out!Space+l)
- Custom context-menu (try it!;+c)
- Modular configuration (seestructure)
- Auto-completeprabirshrestha/asyncomplete.vim extensive setup
- Shougo/denite.nvim centric work-flow (lists)
- Structure view withliuchengxu/vista.vim
- Open SCM detailed URL in OS browser
- Light-weight but informative status/tabline
- Easy customizable theme
- Premium color-schemes
- Central location for tags and sessions
- Python 3 (
brew install python) - Neovim or Vim (
brew install neovimand/orbrew install vim)
Caveat: You must haveone of these tools installed:yj,yq,yaml2json, Ruby, or Python withPyYAML in-order for the YAML configuration to be parsed.
1. Let's clone this repo! Clone to~/.config/nvim,we'll also symlink it for regular Vim:
mkdir~/.configgit clone git://github.com/PegasusWang/vim-config.git~/.config/nvimcd~/.config/nvimln -s~/.config/nvim~/.vim# For "regular" Vim
- Note: If you set a custom
$XDG_CONFIG_HOME,use that instead of~/.configin the commands above.Neovim follows the XDG base-directories convention, Vim doesn't.
2. Install the Python 3pynvim library. This is also needed for Vim 8if you want to use Denite and Defx.
Neovim:
./venv.shorpip3 install --user pynvim
Vim:
pip3 install --user pynvim
3. Runmake test to test your nvim/vim version and capabilities.
4. Runmake to install all plugins.
5. If you are experiencing problems, run and readnvim -c checkhealth
Test Python 3 availability with:py3 print(sys.version_info)
Enjoy! 😄
To leverage LSP auto-completions and other functionalities, once you open afile in Neo/vim, run:LspInstallServer <name> to usemattn/vim-lsp-settingsinstallation feature, useTab to list available servers.
Here are a few useful commands:
- For example, open a
.gofile, and run::LspInstallServer gopls - In a
gofile, use action:LspCodeAction source.organizeImports - Seeconfig/plugins/lsp.vim for special code intellisense mappings
cd~/.config/nvimmake update
This will rungit pull --ff --ff-only and update all plugins usingShougo/dein.vim package-manager (:call dein#update()).
- Pragmata Pro (€19 – €1,990): My preferred font
- Any of theNerd Fonts
On macOS with Homebrew, choose one of theNerd Fonts,for example, to install theHack font:
brew tap homebrew/cask-fontsbrew search nerd-fontbrew cask install font-hack-nerd-fontbrew cask install font-iosevka-nerd-font-monobrew cask install font-jetbrains-monobrew cask install font-fira-code
- macOS with Homebrew:
brew install shellcheck jsonlint yamllint tflint ansible-lintbrew install tidy-html5 proselint write-good
- Node.js based linters:
yarn global add eslint jshint jsxhint stylelint sass-lintyarn global add markdownlint-cli raml-cop
- Python based linters:
pip3 install --user vim-vint pycodestyle pyflakes flake8
- agggreer/the_silver_searcher(macOS:
brew install the_silver_searcher)- and/orripgrep:BurntSushi/ripgrep(macOS:
brew install rg)
- and/orripgrep:BurntSushi/ripgrep(macOS:
- Jump around withz:rupa/z(macOS:
brew install z)- orz.lua:acme/zlua
- Universal ctags for syntax tokenization(macOS:
brew install universal-ctags/universal-ctags/universal-ctags) - Fuzzy file finders:fzf,fzy, orpeco(macOS:
brew install fzf)
If you want to add your own configuration, create theconfig/local.vim fileand add your personal vimscript there. If you'd like to install plugins byyourself, create aconfig/local.plugins.yaml file and manage your own plugincollection.
If you want to disable some of the plugins I use, you can overwrite them, e.g.:
-{ repo: mattn/vim-lsp-settings, if: 0 }You can use your localconfig/local.vim to disable status and tab lines:
letg:tabline_plugin_enable=0letg:statusline_plugin_enable=0
Now, usingconfig/local.plugins.yaml you can install any line plugin youwant,e.g.:
# Use only one!-repo:itchyny/lightline.vim-repo:vim-airline/vim-airline-repo:glepnir/galaxyline.nvim-repo:glepnir/spaceline.vim-repo:liuchengxu/eleline.vim
- config/ - Configuration
- plugins/ - Plugin configurations
- filetype.vim - Language behavior
- general.vim - General configuration
- local.plugins.yaml - Custom user plugins
- local.vim - Custom user settings
- mappings.vim - Key-mappings
- plugins.yaml - My favoritePlugins!
- terminal.vim - Terminal configuration
- vimrc - Initialization
- ftplugin/ - Language specific custom settings
- plugin/ - Customized small plugins
- snippets/ - Personal code snippets
- themes/ - Colorscheme overrides
- filetype.vim - Custom filetype detection
- Plugin management with cache and lazy loading for speed
- Auto-completion with Language-Server Protocol (LSP)
- Project-aware tabs and labels
- Defx as file-manager + Git status icons
- Extensive language extensions library
Note that 95% of the plugins arelazy-loaded.
List(🔎 Click to expand/collapse)
| Name | Description |
|---|---|
| Shougo/dein.vim | Dark powered Vim/Neovim plugin manager |
| rafi/awesome-colorschemes | Awesome color-schemes |
| thinca/vim-localrc | Enable configuration file of each directory |
| romainl/vim-cool | Simple plugin that makes hlsearch more useful |
| sgur/vim-editorconfig | EditorConfig plugin written entirely in Vimscript |
| christoomey/tmux-navigator | Seamless navigation between tmux panes and vim splits |
| tpope/vim-sleuth | Heuristically set buffer indent options |
| antoinemadec/FixCursorHold.nvim | Neovim CursorHold workaround |
| roxma/nvim-yarp | Vim8 remote plugin framework for Neovim |
| roxma/vim-hug-neovim-rpc | Vim8 compatibility layer for neovim rpc client |
| Name | Description |
|---|---|
| hail2u/vim-css3-syntax | CSS3 syntax support to vim's built-insyntax/css.vim |
| othree/csscomplete.vim | Updated built-in CSS complete with latest standards |
| cakebaker/scss-syntax.vim | Syntax file for scss (Sassy CSS) |
| groenewege/vim-less | Syntax for LESS |
| iloginow/vim-stylus | Syntax, indentation and autocomplete for Stylus |
| mustache/vim-mustache-handlebars | Mustache and handlebars syntax |
| digitaltoad/vim-pug | Pug (formerly Jade) syntax and indentation |
| othree/html5.vim | HTML5 omnicomplete and syntax |
| plasticboy/vim-markdown | Markdown syntax highlighting |
| pangloss/vim-javascript | Enhanced Javascript syntax |
| HerringtonDarkholme/yats.vim | Advanced TypeScript Syntax Highlighting |
| MaxMEllon/vim-jsx-pretty | React JSX syntax pretty highlighting |
| leafOfTree/vim-svelte-plugin | Syntax and indent plugin for Svelte |
| heavenshell/vim-jsdoc | Generate JSDoc to your JavaScript code |
| jparise/vim-graphql | GraphQL file detection, syntax highlighting, and indentation |
| moll/vim-node | Superb development with Node.js |
| kchmck/vim-coffee-script | CoffeeScript support |
| elzr/vim-json | Better JSON support |
| posva/vim-vue | Syntax Highlight for Vue.js components |
| vim-python/python-syntax | Enhanced version of the original Python syntax |
| Vimjas/vim-python-pep8-indent | A nicer Python indentation style |
| vim-scripts/python_match.vim | Extend the % motion for Python files |
| raimon49/requirements.txt.vim | Python requirements file format |
| StanAngeloff/php.vim | Up-to-date PHP syntax file (5.3 – 7.1 support) |
| tbastos/vim-lua | Lua 5.3 syntax and indentation improved support |
| vim-ruby/vim-ruby | Ruby support |
| keith/swift.vim | Swift support |
| rust-lang/rust.vim | Rust support |
| vim-jp/syntax-vim-ex | Improved Vim syntax highlighting |
| chrisbra/csv.vim | Handling column separated data |
| tpope/vim-git | Git runtime files |
| ekalinin/Dockerfile.vim | Syntax and snippets for Dockerfile |
| tmux-plugins/vim-tmux | Plugin for tmux.conf |
| MTDL9/vim-log-highlighting | Syntax highlighting for generic log files |
| cespare/vim-toml | Syntax for TOML |
| mboughaba/i3config.vim | i3 window manager config syntax |
| dag/vim-fish | Fish shell edit support |
| jstrater/mpvim | Macports portfile configuration files |
| robbles/logstash.vim | Highlights logstash configuration files |
| lifepillar/pgsql.vim | PostgreSQL syntax and indent |
| chr4/nginx.vim | Improved nginx syntax and indent |
| towolf/vim-helm | Syntax for Helm templates (yaml + gotmpl + sprig) |
| udalov/kotlin-vim | Kotlin syntax and indent |
| reasonml-editor/vim-reason-plus | Reason syntax and indent |
| pearofducks/ansible-vim | Improved YAML support for Ansible |
| hashivim/vim-terraform | Base Terraform integration |
| Name | Description |
|---|---|
| Shougo/defx.nvim | Dark powered file explorer implementation |
| kristijanhusak/defx-git | Git status implementation for Defx |
| kristijanhusak/defx-icons | Filetype icons for Defx |
| tyru/caw.vim | Robust comment plugin with operator support |
| Shougo/context_filetype.vim | Context filetype detection for nested code |
| lambdalisue/fin.vim | Filter the buffer content in-place |
| mbbill/undotree | Ultimate undo history visualizer |
| jreybert/vimagit | Ease your git work-flow within Vim |
| tweekmonster/helpful.vim | Display vim version numbers in docs |
| lambdalisue/gina.vim | Asynchronously control git repositories |
| mhinz/vim-grepper | Helps you win at grep |
| kana/vim-altr | Switch to the alternate file without interaction |
| Shougo/vinarise.vim | Hex editor |
| guns/xterm-color-table.vim | Display 256 xterm colors with their RGB equivalents |
| cocopon/colorswatch.vim | Generate a beautiful color swatch for the current buffer |
| dstein64/vim-startuptime | Visually profile Vim's startup time |
| lambdalisue/suda.vim | An alternative sudo.vim for Vim and Neovim |
| liuchengxu/vim-which-key | Shows key-bindings in pop-up |
| brooth/far.vim | Fast find and replace plugin |
| pechorin/any-jump.vim | Jump to any definition and references without overhead |
| jaawerth/nrun.vim | "which" and "exec" functions targeted at local node project bin |
| Vigemus/iron.nvim | Interactive REPL over Neovim |
| kana/vim-niceblock | Make blockwise Visual mode more useful |
| t9md/vim-choosewin | Choose window to use, like tmux's 'display-pane' |
| wfxr/minimap.vim | Blazing fast minimap for vim, powered by code-minimap |
| mzlogin/vim-markdown-toc | Generate table of contents for Markdown files |
| reedes/vim-wordy | Uncover usage problems in your writing |
| liuchengxu/vista.vim | Viewer & Finder for LSP symbols and tags in Vim |
| junegunn/fzf | Powerful command-line fuzzy finder |
| junegunn/fzf.vim | Fzf integration |
| Ron89/thesaurus_query.vim | Multi-language thesaurus query and replacement |
| Name | Description |
|---|---|
| itchyny/vim-gitbranch | Lightweight git branch detection |
| itchyny/vim-parenmatch | Efficient alternative to the standard matchparen plugin |
| haya14busa/vim-asterisk | Improved * motions |
| rhysd/accelerated-jk | Up/down movement acceleration |
| haya14busa/vim-edgemotion | Jump to the edge of block |
| t9md/vim-quickhl | Highlight words quickly |
| rafi/vim-sidemenu | Small side-menu useful for terminal users |
| machakann/vim-highlightedyank | Make the yanked region apparent |
| itchyny/cursorword | Underlines word under cursor |
| airblade/vim-gitgutter | Show git changes at Vim gutter and un/stages hunks |
| kshenoy/vim-signature | Display and toggle marks |
| nathanaelkane/vim-indent-guides | Visually display indent levels in code |
| rhysd/committia.vim | Pleasant editing on Git commit messages |
| junegunn/goyo | Distraction-free writing |
| junegunn/limelight | Hyperfocus-writing |
| itchyny/calendar.vim | Calendar application |
| deris/vim-shot-f | Highlight characters to move directly with f/t/F/T |
| vimwiki/vimwiki | Personal Wiki for Vim |
| norcalli/nvim-colorizer.lua | The fastest Neovim colorizer |
| Name | Description |
|---|---|
| prabirshrestha/async.vim | Normalize async job control API for Vim and Neovim |
| prabirshrestha/asyncomplete.vim | Async-completion in pure Vimscript for Vim8 and Neovim |
| prabirshrestha/asyncomplete-lsp.vim | Provide Language Server Protocol autocompletion source |
| prabirshrestha/vim-lsp | Async Language Server Protocol plugin for Vim and Neovim |
| mattn/vim-lsp-settings | Auto LSP configurations for vim-lsp |
| Shougo/neco-vim | Completion source for Vimscript |
| prabirshrestha/asyncomplete-necovim.vim | Provides syntax autocomplete via neco-vim |
| prabirshrestha/asyncomplete-buffer.vim | Provides buffer autocomplete |
| prabirshrestha/asyncomplete-tags.vim | Provides tag autocomplete via vim tagfiles |
| prabirshrestha/asyncomplete-file.vim | Provides file autocomplete |
| wellle/tmux-complete.vim | Completion of words in adjacent tmux panes |
| prabirshrestha/asyncomplete-ultisnips.vim | Provides UltiSnips autocomplete |
| SirVer/ultisnips | Ultimate snippet solution |
| honza/vim-snippets | Community-maintained snippets for programming languages |
| mattn/emmet-vim | Provides support for expanding abbreviations alá emmet |
| ludovicchabant/vim-gutentags | Manages your tag files |
| Raimondi/delimitMate | Auto-completion for quotes, parens, brackets |
| Name | Description |
|---|---|
| Shougo/denite.nvim | Dark powered asynchronous unite all interfaces |
| Shougo/neomru.vim | Denite plugin for MRU |
| Shougo/neoyank.vim | Denite plugin for yank history |
| Shougo/junkfile.vim | Denite plugin for temporary files |
| chemzqm/unite-location | Denite location & quickfix lists |
| rafi/vim-denite-session | Browse and open sessions |
| rafi/vim-denite-z | Filter and browse Z (jump around) data file |
| liuchengxu/vim-clap | Modern performant generic finder and dispatcher |
| Name | Description |
|---|---|
| kana/vim-operator-user | Define your own custom operators |
| kana/vim-operator-replace | Operator to replace text with register content |
| machakann/vim-sandwich | Search, select, and edit sandwich text objects |
| kana/vim-textobj-user | Create your own text objects |
| terryma/vim-expand-region | Visually select increasingly larger regions of text |
| AndrewRadev/sideways.vim | Match function arguments |
| AndrewRadev/splitjoin.vim | Transition code between multi-line and single-line |
| AndrewRadev/linediff.vim | Perform diffs on blocks of code |
| AndrewRadev/dsf.vim | Delete surrounding function call |
| kana/vim-textobj-function | Text objects for functions |
Note that,
- Leader key set as,
- Local-Leader key set as; and used for navigation and search(Denite and Defx)
- Disable←↑→↓ in normal mode by enabling
g:elite_modein.vault.vim
Key-mappings(🔎 Click to expand/collapse)
Modes: 𝐍=normal 𝐕=visual 𝐒=select 𝐈=insert 𝐂=command| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| j /k | 𝐍 𝐕 | Cursor moves through display-lines | gj/k |
| g+j /k | 𝐍 𝐕 𝐒 | Jump to edge upward/downward | haya14busa/vim-edgemotion |
| gh /gl | 𝐍 𝐕 | Easier line-wise movement | g^/$ |
| Space+Space | 𝐍 𝐕 | Toggle visual-line mode | V /Escape |
| v /V | 𝐕 | Expand/reduce selection | terryma/vim-expand-region |
| zl /zh | 𝐍 | Scroll horizontally and vertically wider | z4l/h |
| Ctrl+j | 𝐍 | Move to split below | christoomey/tmux-navigator |
| Ctrl+k | 𝐍 | Move to upper split | christoomey/tmux-navigator |
| Ctrl+h | 𝐍 | Move to left split | christoomey/tmux-navigator |
| Ctrl+l | 𝐍 | Move to right split | christoomey/tmux-navigator |
| Return | 𝐍 | Toggle fold | za |
| Shift+Return | 𝐍 | Focus the current fold by closing all others | zMzvzt |
| ]q or]q | 𝐍 | Next/previous on quickfix list | :cnext /:cprev |
| ]l or]l | 𝐍 | Next/previous on location-list | :lnext /:lprev |
| ]w or]w | 𝐍 | Next/previous whitespace error | plugin/whitespace.vim |
| ]g or]g | 𝐍 | Next/previous Git hunk | airblade/vim-gitgutter |
| ]d or]d | 𝐍 | Next/previous LSP diagnostic | mattn/vim-lsp-settings |
| Ctrl+f | 𝐂 | Move cursor forwards in command | Right |
| Ctrl+b | 𝐂 | Move cursor backwards in command | Left |
| Ctrl+h | 𝐂 | Move cursor to the beginning in command | Home |
| Ctrl+l | 𝐂 | Move cursor to the end in command | End |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| Space+cd | 𝐍 | Switch to the directory of opened buffer | :lcd %:p:h |
| gf | 𝐍 𝐕 | Open file under the cursor in a vsplit | :rightbelow wincmd f |
| Space+w | 𝐍 𝐕 𝐒 | Write buffer to file | :write |
| Ctrl+s | 𝐍 𝐕 𝐒 𝐂 | Write buffer to file | :write |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| Ctrl+Return | 𝐈 | Expand emmet abbreviation | mattn/emmet-vim |
| Q | 𝐍 | Start/stop macro recording | q |
| gQ | 𝐍 | Play macro 'q' | @q |
| Shift+Return | 𝐈 | Start new line from any cursor position | <C-o>o |
| < | 𝐕 𝐒 | Indent to left and re-select | <gv |
| > | 𝐕 𝐒 | Indent to right and re-select | `>gv |
| Tab | 𝐕 𝐒 | Indent to right and re-select | `>gv |
| Shift+Tab | 𝐕 𝐒 | Indent to left and re-select | <gv |
| gc | 𝐍 𝐕 𝐒 | Caw (comments plugin) prefix | tyru/caw.vim |
| gcc | 𝐍 𝐕 𝐒 | Toggle comments | tyru/caw.vim |
| Space+v | 𝐍 𝐕 𝐒 | Toggle single-line comments | tyru/caw.vim |
| Space+V | 𝐍 𝐕 𝐒 | Toggle comment block | tyru/caw.vim |
| Space+j ork | 𝐍 𝐕 | Move lines down/up | :m … |
| Space+d | 𝐍 𝐕 | Duplicate line or selection | |
| Space+cn /cN | 𝐍 𝐕 | Change current word in a repeatable manner | |
| Space+cp | 𝐍 | Duplicate paragraph | yap<S-}>p |
| Space+cw | 𝐍 | Remove all spaces at EOL | :%s/\s\+$//e |
| Ctrl+gg | 𝐈 | Jump outside of pair | Raimondi/delimitMate |
| sj /sk | 𝐍 | Join/split arguments | AndrewRadev/splitjoin.vim |
| dsf /csf | 𝐍 | Delete/change surrounding function call | AndrewRadev/dsf.vim |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| Space+f | 𝐍 | Filter lines in-place | lambdalisue/fin.vim |
| * /# | 𝐍 𝐕 | Search selection forward/backward | haya14busa/vim-asterisk |
| g* /g# | 𝐍 𝐕 | Search whole-word forward/backward | haya14busa/vim-asterisk |
| Backspace | 𝐍 | Match bracket | % |
| gp | 𝐍 | Select last paste | |
| sg | 𝐕 | Replace within selected area | :s/⌴/gc |
| Ctrl+r | 𝐕 | Replace selection with step-by-step confirmation | :%s/\V/⌴/gc |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| p | 𝐕 𝐒 | Paste without yank | kana/vim-operator-replace |
| Y | 𝐍 | Yank to the end of line | y$ |
| Space+y | 𝐍 | Copy relative file-path to clipboard | |
| Space+Y | 𝐍 | Copy absolute file-path to clipboard |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| ! | 𝐍 | Shortcut for shell command | :! |
| g! | 𝐍 | Read vim command into buffer | :put=execute('⌴') |
| Ctrl+n /p | 𝐂 | Switch history search pairs | ↓ /↑ |
| ↓ /↑ | 𝐂 | Switch history search pairs | Ctrln/p |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| Space+ts | 𝐍 | Toggle spell-checker | :setlocal spell! |
| Space+tn | 𝐍 | Toggle line numbers | :setlocal nonumber! |
| Space+tl | 𝐍 | Toggle hidden characters | :setlocal nolist! |
| Space+th | 𝐍 | Toggle highlighted search | :set hlsearch! |
| Space+tw | 𝐍 | Toggle wrap | :setlocal wrap! … |
| Space+ti | 𝐍 | Toggle indentation lines | nathanaelkane/vim-indent-guides |
| g1 | 𝐍 | Go to first tab | :tabfirst |
| g9 | 𝐍 | Go to last tab | :tablast |
| g5 | 𝐍 | Go to previous tab | :tabprevious |
| Ctrl+Tab | 𝐍 | Go to next tab | :tabnext |
| Ctrl+ShiftTab | 𝐍 | Go to previous tab | :tabprevious |
| Alt+j | 𝐍 | Go to next tab | :tabnext |
| Alt+k | 𝐍 | Go to previous tab | :tabprevious |
| Alt+{ | 𝐍 | Move tab backward | :-tabmove |
| Alt+} | 𝐍 | Move tab forward | :+tabmove |
| Space+h | 𝐍 | Show highlight groups for word |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| - | 𝐍 | Choose a window to edit | t9md/vim-choosewin |
| ;+c | 𝐍 | Open context-menu | plugin/actionmenu.vim |
| gK | 𝐍 | Open Zeal or Dash on some file-types | plugin/devhelp.vim |
| gCtrl+o | 𝐍 | Navigate to previous file on jumplist | plugin/jumpfile.vim |
| gCtrl+i | 𝐍 | Navigate to next file on jumplist | plugin/jumpfile.vim |
| Space+l | 𝐍 | Open side-menu helper | rafi/vim-sidemenu |
| Space+b | 𝐍 | Open structure window | liuchengxu/vista.vim |
| Space+a | 𝐍 | Show nearby tag in structure window | liuchengxu/vista.vim |
| Space+se | 𝐍 | Save current workspace session | plugin/sessions.vim |
| Space+sl | 𝐍 | Load workspace session | plugin/sessions.vim |
| Space+n/N | 𝐍 | Open alternative file | kana/vim-altr |
| Space+tc | 𝐍 | Enable scroll-context window | [wellle/context.vim] |
| Space+tp | 𝐍 | Peek scroll-context window | [wellle/context.vim] |
| Space+S | 𝐍 𝐕 | Source selection | y:execute @@ |
| Space+? | 𝐍 | Open the macOS dictionary on current word | :!open dict:// |
| Space+P | 𝐍 | Use Marked 2 for real-time Markdown preview | Marked 2 |
| Space+ml | 𝐍 | Append modeline to end of buffer | config/mappings.vim |
| Space+mda | 𝐕 | Sequentially mark region for diff | AndrewRadev/linediff.vim |
| Space+mdf | 𝐕 | Mark region for diff and compare if more than one | AndrewRadev/linediff.vim |
| Space+mds | 𝐍 | Shows the comparison for all marked regions | AndrewRadev/linediff.vim |
| Space+mdr | 𝐍 | Removes the signs denoting the diff regions | AndrewRadev/linediff.vim |
| Space+mg | 𝐍 | Open Magit | jreybert/vimagit |
| Space+mt | 𝐍 𝐕 | Toggle highlighted word | t9md/vim-quickhl |
| Space+- | 𝐍 | Switch editing window with selected | t9md/vim-choosewin |
| Space+G | 𝐍 | Toggle distraction-free writing | junegunn/goyo |
| Space+gu | 𝐍 | Open undo-tree | mbbill/undotree |
| Space+K | 𝐍 | Thesaurus | Ron89/thesaurus_query.vim |
| Space+W | 𝐍 | VimWiki | vimwiki/vimwiki |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| q | 𝐍 | Quit window (and Vim, if last window) | :quit |
| Ctrl+q | 𝐍 | Remap to C-w | Ctrl+w |
| Ctrl+x | 𝐍 | Rotate window placement | C-wx |
| sv | 𝐍 | Horizontal split | :split |
| sg | 𝐍 | Vertical split | :vsplit |
| st | 𝐍 | Open new tab | :tabnew |
| so | 𝐍 | Close other windows | :only |
| sb | 𝐍 | Previous buffer | :b# |
| sc | 𝐍 | Close current buffer | :close |
| sx | 𝐍 | Delete buffer, leave blank window | :enew │ bdelete |
| sz | 𝐍 | Toggle window zoom | :vertical resize │ resize |
| ssv | 𝐍 | Split with previous buffer | :split │ wincmd p │ e# |
| ssg | 𝐍 | Vertical split with previous buffer | :vsplit │ wincmd p │ e# |
| sh | 𝐍 | Toggle colorscheme background=dark/light | :set background … |
| s- | 𝐍 | Lower solarized8 colorscheme contrast | :colorscheme … |
| s= | 𝐍 | Raise solarized8 colorscheme contrast | :colorscheme … |
| Key | Mode | Action | Plugin or Mapping |
|---|---|---|---|
| gs | 𝐍 | Preview hunk | airblade/vim-gitgutter |
| gS | 𝐍 𝐕 𝐒 | Stage hunk | airblade/vim-gitgutter |
| Space+gr | 𝐍 | Revert hunk | airblade/vim-gitgutter |
| Space+ga | 𝐍 | Git add current file | lambdalisue/gina.vim |
| Space+gd | 𝐍 | Git diff | lambdalisue/gina.vim |
| Space+gc | 𝐍 | Git branches | lambdalisue/gina.vim |
| Space+gc | 𝐍 | Git commit | lambdalisue/gina.vim |
| Space+gb | 𝐍 | Git blame | lambdalisue/gina.vim |
| Space+gs | 𝐍 | Git status -s | lambdalisue/gina.vim |
| Space+gl | 𝐍 | Git log --all | lambdalisue/gina.vim |
| Space+gF | 𝐍 | Git fetch | lambdalisue/gina.vim |
| Space+gp | 𝐍 | Git push | lambdalisue/gina.vim |
| Space+go | 𝐍 𝐕 | Open SCM detailed URL in browser | lambdalisue/gina.vim |
| Key | Mode | Action |
|---|---|---|
| ;r | 𝐍 | Resumes last Denite window |
| ;f | 𝐍 | File search |
| ;g | 𝐍 | Grep search |
| ;b | 𝐍 | Buffers |
| ;i | 𝐍 | Old files |
| ;x | 𝐍 | Most recently used files (MRU) |
| ;d | 𝐍 | Directories and MRU |
| ;v | 𝐍 𝐕 | Yank history |
| ;l | 𝐍 | Location list |
| ;q | 𝐍 | Quick fix |
| ;m | 𝐍 | Marks |
| ;n | 𝐍 | Dein plugin list |
| ;j | 𝐍 | Jump points and change stack |
| ;u | 𝐍 | Junk files |
| ;o | 𝐍 | Outline tags |
| ;s | 𝐍 | Sessions |
| ;t | 𝐍 | Tag list |
| ;p | 𝐍 | Jumps |
| ;h | 𝐍 | Help |
| ;w | 𝐍 | Memo list |
| ;z | 𝐍 | Z (jump around) |
| ;; | 𝐍 | Command history |
| ;/ | 𝐍 | Buffer lines |
| ;* | 𝐍 | Search word under cursor with lines |
| Space+gt | 𝐍 | Find tags matching word under cursor |
| Space+gf | 𝐍 | Find files matching word under cursor |
| Space+gg | 𝐍 𝐕 | Grep word under cursor |
| WithinDenite window | ||
| jj orEscape | 𝐈 | Leave Insert mode |
| i or/ | 𝐍 | Enter Insert mode (filter input) |
| q orEscape | 𝐍 | Exit denite window |
| Tab orShift+Tab | 𝐈 | Next/previous candidate |
| Space | 𝐍 | Select candidate entry |
| dd | 𝐍 | Delete entry |
| p | 𝐍 | Preview entry |
| st | 𝐍 | Open in a new tab |
| sg | 𝐍 | Open in a vertical split |
| sv | 𝐍 | Open in a split |
| ' | 𝐍 | Quick-move |
| r | 𝐍 | Redraw |
| yy | 𝐍 | Yank |
| Tab | 𝐍 | List and choose action |
| Key | Mode | Action |
|---|---|---|
| ;e | 𝐍 | Open file-explorer (toggle) |
| ;a | 𝐍 | Focus current file in file-explorer |
| WithinDefx window | ||
| j ork | 𝐍 | Move up and down the tree |
| l orReturn | 𝐍 | Toggle collapse/expand directory or open file |
| h | 𝐍 | Collapse directory tree |
| t | 𝐍 | Expand directory tree recursively |
| . | 𝐍 | Toggle hidden files |
| Space | 𝐍 | Select entry |
| * | 𝐍 | Invert selection (select all) |
| & or</kbd> | 𝐍 | Change into current working directory |
| ~ | 𝐍 | Change to user home directory |
| u orBackspace | 𝐍 | Change into parent directory |
| u2/3/4 | 𝐍 | Change into parent directory count |
| st | 𝐍 | Open file in new tab |
| sv | 𝐍 | Open file in a horizontal split |
| sg | 𝐍 | Open file in a vertical split |
| N | 𝐍 | Create new directories and/or files |
| K | 𝐍 | Create new directory |
| c /m /p | 𝐍 | Copy, move, and paste |
| r | 𝐍 | Rename file or directory |
| dd | 𝐍 | Trash selected files and directories |
| y | 𝐍 | Yank path to clipboard |
| w | 𝐍 | Toggle window size |
| ]g | 𝐍 | Next dirty git item |
| [g | 𝐍 | Previous dirty git item |
| x orgx | 𝐍 | Execute associated system application |
| gd | 𝐍 | Open git diff on selected file |
| gl | 𝐍 | Open terminal file explorer with tmux |
| gr | 𝐍 | Grep in current position |
| gf | 𝐍 | Find files in current position |
| Key | Mode | Action |
|---|---|---|
| WithinClap window | ||
| jj orEscape | 𝐈 | Leave Insert mode |
| i | 𝐍 | Enter Insert mode (filter input) |
| q orEscape | 𝐍 | Exit clap window |
| Tab orShift+Tab | 𝐈 | Next/previous candidate |
| Space or' | 𝐍 | Select candidate entry |
| st | 𝐍 | Open in a new tab |
| sg | 𝐍 | Open in a vertical split |
| sv | 𝐍 | Open in a split |
| Key | Mode | Action |
|---|---|---|
| Tab /Shift-Tab | 𝐈 | Navigate completion-menu |
| Enter | 𝐈 | Select completion or expand snippet |
| Ctrl+j/k/d/u | 𝐈 | Movement in completion pop-up |
| Ctrl+Return | 𝐈 | Expand Emmet sequence |
| Ctrl+Space | 𝐈 | Refresh and show candidates |
| Ctrl+y | 𝐈 | Close pop-up |
| Ctrl+e | 𝐈 | Cancel selection and close pop-up |
| Ctrl+l | 𝐈 | Expand snippet at cursor |
| Tab /Shift-Tab | 𝐈 𝐒 | Navigate snippet placeholders |
| Key | Mode | Action |
|---|---|---|
| Space+ii | 𝐍 | Jump to definition under cursor |
| Space+ii | 𝐕 | Jump to selected text in visual mode |
| Space+ib | 𝐍 | Open previous opened file (after jump) |
| Space+il | 𝐍 | Open last closed search window again |
| Key | Mode | Action |
|---|---|---|
| m/ orm? | 𝐍 | Show list of buffer marks/markers |
| mm | 𝐍 | Toggle mark on current line |
| m, | 𝐍 | Place next mark |
| ma-z | 𝐍 | Place specific mark (Won't work for:mm,mn,mp) |
| dma-z | 𝐍 | Remove specific mark (Won't work for:mm,mn,mp) |
| mn | 𝐍 | Jump to next mark |
| mp | 𝐍 | Jump to previous mark |
| ]= | 𝐍 | Jump to next marker |
| [= | 𝐍 | Jump to previous marker |
| m- | 𝐍 | Purge all on current line |
| mSpace | 𝐍 | Purge marks |
| mBackspace | 𝐍 | Purge markers |
Big thanks to the dark knightShougo.
# https://github.com/tmux/tmux/issues/543brew install reattach-to-user-namespace# then edit your .tmux.confset -g default-shell $SHELLset -g default-command "reattach-to-user-namespace -l ${SHELL}"# In .vimrc or ~/.config/nvim/init.vim (I use Neovim):set clipboard=unnamed# reload tmux configtmux source-file ~/.tmux.confSee thisVim text rendering off by one issue
如果你使用了 Iterm2 + neovim,并且在 gutter 栏使用了 emoji 表情,比如 vim-gitgutter, vim-ale 等插件的提示是 emoji。请勾选 Iterm2->Profiles->Text->Use Unicode versoin 9 widths
See this issuehttps://stackoverflow.com/questions/43107435/emoji-display-issue-in-vim-with-tmux/52142277#52142277
最好在你的根目录或者项目目录加上 ag 搜索需要忽略的文件,防止 denite 搜索占用太大内存,并且加速筛选内容
add~/.agignore file:
node_modules.git.ropeprojectgen-py/gen-go/eggs/.tmp/vendor/*.swp*.pyc使用 fzf.vim 有个 :Ag 命令搜索的时候可以把结果发送到 quickfix 窗口。通常搜索结果可以使用 ctrl+n/p 来选择
使用方式:
- :Ag 搜索需要的单词。
:Ag word - alt-a 全选 (注意 MacOS iterm2: Settings -> Profiles -> Keys Left Option choose Esc+)
- alt-d 可以取消选择
- Enter 即可,这时候就可以把搜索结果发送到 quickfix 窗口
If you want to usecoc.nvim for Golang completion,please see this article《vim as a go ide》.Now you can usecoc branch for go completion(use gopls). If you use python, typeCocInstall coc-python installpython coc plugin.
(注意笔者基于开源配置代码修改,笔者的 leader 是 "," 而不是文档中的 Space)
About
Lean mean (Neo)Vim machine, carefully crafted with ❤️ Use with Neovim v0.1.5+ or Vim v7.4+
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- Vim Script96.8%
- Vim Snippet1.1%
- Other2.1%
