Skip to content

Shenziger/vim-settings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

My VIM Settings

This VIM settings is newest for my MacOSX, I usually use my VIM to write some Golang, Python, Markdown, C/C++, etc. It use vim-plug replace to the vundle to manage the plugins. Replaced many old plugins with new plugin which are more suitable in VIM-8 And remove some plugin which I dose not usually use.

VIM Version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct 15 2019 10:20:59) macOS version

Dependences

brew install cmake macvim pygments global cppcheck prettier
brew unlink ctags && brew install --HEAD universal-ctags/universal-ctags/universal-ctags
sudo pip install isort yapf flake8 autopep8 pylint

Plugins

use vim-plug manage plugins: the .vimrc will automatic download the vim-plug

Short Keys

  • change buf: ]b [b
  • open a new tab: <F6>
  • change tab: ]t [t
  • copy (all/selected) content: Ctrl+c
  • write RO file: w!!
  • line number toggle: <F2>
  • nerdtree toggle: <F3>
  • function list: <F4>
  • run python script: <F5>
  • paste toggle: <F7>
  • lint fix: <F8>
  • format current json content: <F9>
  • Automatically wrap spaces for English words and numbers in Chinese: <F10>
  • wrap "/' for a word: <leader>w"/<leader>w'
  • uppercase/lowercase toggle with a _ prefix: !
  • delete current letter and toggle uppercase/lowercase: @
  • continue indent text to left or right on select/normal mode: > <
  • switch window: <C-HJKL>
  • resize window: <C-UpDownLeftRightEnter>
  • close quickfix window: <leader>q
  • find files: <leader>f
  • find mru files: <leader>m
  • complete python code: <C-n>
  • format json line: <leader>wj <leader>pj
  • change surround: csXY
  • del surround: dsX
  • comment/uncomment: <leader>cc/<leader>cu
  • table mode: <leader>tm
  • build gofile: <leader>gb
  • run gofile: <leader>gr
  • run go test: <leader>gt
  • code complete: <c-z>
  • write vimwiki: <leader>ww
  • expand snips: <c-e>
  • change random colorscheme: <leader>c

Features

  • no backup and swap file
  • correct encoding for chinese
  • beautiful statusline and startify
  • auto reload vimrc when it is changed
  • highlight and ignorecase for search text
  • support using mouse
  • auto remove whitespace which at the line tail and blank line at the latest
  • show content in terminal when exit the vim
  • open a file at the latest change position
  • auto check syntax
  • one key to fix linter check
  • run python script with virtualenv if there is a $VIRTUAL_ENV (open script with virtualenv in terminal)
  • auto complete the code
  • show git diff in vim
  • multiple cursors for editing
  • use tomorrow-night-bright color scheme
  • color preview for .css files
  • auto format markdown tables in table mode
  • auto choice random colorscheme, use <leader>c or :CSnext can change the theme, :Hate to let the colorscheme be used again

Screenshots

some pics are old, don't trust them...

default open a python file

working


next pics come from the plugin projects

json line format(I am the author 😳)

startify

vim-coloresque

vim-table-mode

Usage

use vim-plug, just need copy .vimrc to your HOME path and run :PlugInstall in vim.

About

My vimrc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%