VIM Configuration Continuous logging

Source: Internet
Author: User
Tags directory create

1. Home directory create the. vimrc file

Set Nu # Sets line number

Set tabstop=4 # tab TAB indent

Set Autoindent # Auto Indent

Set Showmatch # parentheses match highlighting

Execute Pathogen#infect () # # # # # # # # # # #
  
Syntax on this three line is pathogen Vim plug-in Manager configuration

  FileType plugin indent on # # # # # # # # #

ColorScheme Evening # Color Style

Set laststatus=2 # Show status bar
Set statusline=\%<%f[%1*%m%*%n%r%h]%=\%y\%0 (%{&fileformat}\ [%{(&fenc==\ "\" &enc:&fenc). ( &bomb?\ ", bom\": \ "\")}]\%c:%l/%l%) # status bar display format

Map <F2>:nerdtreetoggle<cr> # Nerdtree directory tree, accelerator bindings, such as press F2 to open or close the directory list

2. Install the pathogen Vim plugin Manager

The official installation method is Https://github.com/tpope/vim-pathogen. Will generate ~/.vim/autoload/and ~/.vim/bundle directories, each plugin as a standalone folder under the bundle directory

Install plugins: For example: Nerdtree ,git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree 然后重启vim,按F12即可查看目录

Remove plugins: Go to ~/.vim/bundle/to delete the corresponding plugin directory

Update plugin: Go to the specific plugin directory and execute Git pull origin

3. Vim creates new file on new tab: tabnew path/file name

Edit an existing file in a new tab: Tabedit path/file name

Toggle between tabs: TABN represents the next label

Reference: https://www.cnblogs.com/hnrainll/archive/2011/04/29/2032660.html

4. Vim Multi-window segmentation and switch exit, reference: http://www.jb51.net/LINUXjishu/118276.html

5. Vim use tabnew new file, Nerdtree tree is not automatically updated, first switch to directory list, press SHIFT + R, manually refresh

6. Vim needs to be revoked when editing. ESC exits the edit state, pressing U to undo the last action. CRTL + R recoverable undo

7. In the VIM command line mode, delete a row and press DD. Delete a character, press X

8. Vim single row, multi-line copy sticky, ref: 42148865

VIM Configuration Continuous logging

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.