Giter Site home page Giter Site logo

vimrc's Introduction

How to

Installation

In your home folder:

git clone git://github.com/carlcarl/vimrc.git
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/gvimrc ~/.gvimrc
vim // or nvim
:PluginInstall

Addictional Shortcuts

tab: autocomplete
<C-\>: template

#snippet
ctrl + k: snippet complete or jump

T: tasklist
L & H: change tab(gt & gT)
gc(selection mode): comment selection
gcc: comment current line
<leader><leader>w: easy motion
<leader><leader>t: easy motion + search
ctrl + F12: ctags
ctrl + ]: find definition
ctrl + t: back to usage
ctrl + o: previous action
S<tag>(selection mode): surround
cs<tag><tag2>: replace tag to tag2
ds<tag>: delete tag
F1: show or hide line number
F2 or <leader>p: paste mode
F4 or <leader>n: nerd_tree
F5: Remove all signs
F6: Disable gitgutter
F9: Tagbar
:Gdiff git diff with HEAD
:Gblame git blame
ctrl + k: expand snippet
ctrl + b: move to next position of snippet

#cscope
ctrl + \ + g: find definition
ctrl + \ + s: find this symbol
ctrl + \ + c: find the functions which call the function
ctrl + \ + t: find the text string
ctrl + \ + i: find files include this file
ctrl + \ + f: open the file

#gitgutter
gh: next hunk
gH: previoud hunk

#Python
:Pylint: python syntax check
:Pydoc function: find function definition in python document
K: find current function definition in python document
F: code folding(all)
f: code folding
<C-c>g goto definition
<C-c>d show documentation
<C-c>f find occurrences
<leader>r run python
<leader>b set breakpoint

#Django
S + -: {{ content }}
S + =: {% content %}

Normal Shortcuts

gg: Begin of file
G: End of file
^: Begin of current line
$: End of current line

A: Insert at line end
o: Insert a new line after current line
O: Insert a new line before current line

fx: Find 'x' after current position in current line
Fx: Find 'x' before current position in current line
*: Find current word in file

viw: Select word
vit: Select content in tag 
vat: Select content include tag

ctrl+[: Back to normal mode(Esc)

<C-N> or <C-X><C-N>: autocomplete in document
<C-F> or <C-X><C-F>: autocomplete path
<C-J> or <C-X><C-I>: autocomplete in header
<C-X><C-O>: autocomplete

Package dependency

clang: c autocomplete
pylint: python syntax check
php: php syntax check 

vimrc's People

Contributors

carlcarl avatar carl-h-20230331 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.