Rapid configuration of vim Linux

Label LinuxVIMExample
34 people read comments(0) Collection Report

1, modify the current user's VIM profile

~/.vimrc VIM
$VIMRUNTIME/vimrc_example.vim read
# second loading VIM example

Tabstop=4 set
Shiftwidth=4 set
Softtabstop=4 set
Set Nu "display line numbers
Color colorscheme evening "configuration file in /usr/shar/vim

Set nobackup "off the two options can make VIM not automatically generated ~ and SWP document, for in the GIT directory edit more convenient
Noswapfile set

In the last # file added to the above set

#49 line of mouse=a Ubuntu in X set under the best shield, the right mouse button is not easy copy&paste

2, the installation directory browser plug-in Tree NERD

Download address:Https://github.com/scrooloose/nerdtree

Http://www.vim.org/scripts/script.php? Script_id=1658?

Download after decompression to Tree NERD directory below there are two directories doc and plugin

Doc/* ~/.vim/doc/ $cp
Plugin/* ~/.vim/plugin $cp

# start in.Vimrc NerdTree

"Set NerdTree
<F3> map: NERDTreeMirror<CR>
<F3> map: NERDTreeToggle<CR>

3, the installation of Chinese input method

Download address:Http://www.vim.org/scripts/script.php? Script_id=2506?

The installation method is consistent with the NERDTree plug-in

GI start Chinese input method

# see download address in the description, in Chinese input method under X environment is not necessary

4, the configuration of the current user is copied to the ROOT

#sudo is a command that is often used, so root is also required.

CP ~/.vimrc /root sudo
CP -rf ~/.vim /root sudo

5, VIM commonly used shortcut keys

Like editing files, the cursor is positioned by J K L H
O open to close the file or directory, if it is the file, the cursor appears in the open file
Go effect as above, but the cursor to keep in the file directory, similar to the function of the contents of the preview file
O recursively open lower all directories, if the sub directory more slowly
X and X close all sub directories, corresponding to O and O
C to set the current directory to the top-level directory
T t open the file in the tab page
GT GT switch tab
I and s can be horizontal or vertical split window open file, plus g in front of the function similar to go
CD sets the current directory to CWD

CTRL + W + H cursor focus left tree directory
CTRL + W + L cursor focus on the right side of the file display window
CTRL + W + W cursor automatically in the left and right side window switch
CTRL + W + R to move the current window layout position t in background tabs open p to upper directory of P to the root directory K to the same directory the first node j to the same directory at the end of a node m display file system menu (add, delete, move operation) to help Q close

Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • Visit808 times
    • Integral:One hundred and seventy-six
    • Grade
    • Rank:Thousands of miles away
    • Original16
    • Reproduced:2
    • Translation:0
    • Comments:0
    Classification of articles
    Article Archive