Skip to content

howhow/vimrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Use github to sync vi config

  • Tested on Ubuntu14.04, 16.04 and 18.04
  • Only for C and Assembly language development

How to use

git, vim and gtags* must be installed

git clone https://github.com/howhow/vimrc ~/.my_config/vim
cd ~/.my_config/vim
./install.sh build-essential cmake ctags cscope python3.7 silversearcher-ag nodejs npm

NOTE: For older systems (e.g. Ubuntu 14.04) you may run into compilation issues with cmake. Therefore, install the cmake3 instead:

./install.sh build-essential cmake3 ctags cscope python3.7 silversearcher-ag
wget http://tamacom.com/global/global-6.6.2.tar.gz && \
tar -xvzf global-6.6.2.tar.gz && \
cd ./global-6.6.2 && \
./configure && \
make && \
sudo make install && \
cd -
  • vim installation guide
    • vim version must higher than 8.0
    • Please pay attention to vim version and change corresponding VIMRUNTIMEDIR during make, eg,
    make VIMRUNTIMEDIR=/usr/local/share/vim/vim80
    right now vim version already upgrade to v8.2, therefore:
    make VIMRUNTIMEDIR=/usr/local/share/vim/vim82

NOTE: ctags will be redirected to Exuberant Ctags, which without maintenance long time ago, recommend to install Universal Ctags to instead

Integrated plugins

  1. plugin manager: vim-plug
  2. git: fugitive, gitgutter, gv
  3. complete: YouCompleteMe*, coc
  4. status line: airline
  5. color schemes: gruvbox, solarized, dracula
  6. syntax checking: syntastic, ale
  7. searching: CrtlP,LeaderF, fzf, ack, vim-easymotion
  8. document: vimtex, slumlord
  9. code: tagbar, nerdtree, cscopemaps, gutentags, gutentags_plus, ultisnips, vim-snippets

*YCM need compile after download, if you like it, please refer to the guide

Some features

  1. check tab and EOL whitespace
  2. update tags in async mode by gutentags

Keymaps

Keymap Desc
space leader
<leader> + f Open file list
<leader> + F Open current file function list
<leader> + a Grep current word under cursor
jj/hh/hj/jh Exit insert mode
<leader> + 3 Open quickfix window
<leader> + 4 Close quickfix window
<leader> + 5 Previous quickfix item
<leader> + 6 Next quickfix item
<leader> + 7 Previous file buffer
<leader> + 8 Next file buffer
<leader> + cs Find symbol (reference) under cursor
<leader> + cg Find symbol definition under cursor
<leader> + cd Functions called by this function
<leader> + cc Functions calling this function
<leader> + ct Find text string under cursor
<leader> + ce Find egrep pattern under cursor
<leader> + cf Find file name under cursor
<leader> + ci Find files #including the file name under cursor
<leader> + ca Find places where current symbol is assigned
<leader> + e Strip trailing white space
<leader> + wn Find trailing white space
<leader> + tn Find tab

TODO

  • Compile and install YCM in install.sh
  • Migrate all plugins to async in order to fast vi speed
  • Support python project
  • More error handling in install.sh

LICENSE

MIT

About

example to config vim and use github to sync

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published