VI, VIM configuration up and down ARROW keys and delete keys

Source: Internet
Author: User

VI, VIM configuration up and down ARROW keys and delete keys

1 "An example for a VIMRC file.2 "3 "maintainer:bram Moolenaar <[email protected]>4 "Last change:2002 Sep5 "6 "to use it, copy it to7 "For Unix and OS/2: ~/.VIMRC8 "For AMIGA:S:.VIMRC9 "For MS-dos and Win32: $VIM \_VIMRCTen "For OPENVMS:SYS$LOGIN:.VIMRC One  A "When started as"Evim", Evim.vim would already has done these settings. - ifV:progname =~?"Evim" - Finish the endif -  - "Use the Vim settings, rather then Vi settings (much better!). - "This must is first, because it changes other options as a side effect. + Setnocompatible -  + "Allow backspacing through everything in insert mode A SetBackspace=Indent,eol,start at  - ifHas ("VMS") - SetNobackup"Keep a backup file, use versions instead - Else - SetBackup"Keep a backup file - endif in Sethistory= - "Keep lines of command line history - SetRuler"show the cursor position all the time to SetShowCmd"Display Incomplete Commands + SetIncsearch"Do incremental searching -  the "For Win32 gui:remove ' flag from ' guioptions ': no tearoff menu Entries * "Let &guioptions = Substitute (&guioptions,"T", "", "G") $ Panax Notoginseng "Don ' t use the Ex mode, use Q for formatting - Map Q GQ the  + "This is a alternative that also works in block mode, but the deleted A "text is lost and it 's only works for putting the current register. the "Vnoremap P"_DP +  - "Switch syntax highlighting on while the terminal has colors $ "Also switch on highlighting the last used search pattern. $ if&t_co >2|| Has ("gui_running") - Syntax on - SetHlsearch the endif - Wuyi "Only do the when the compiled with the support for Autocommands. the ifHas ("Autocmd") -  Wu "Enable file type detection. - "Use of the default filetype settings, so-mail gets ' tw ' set to About "' Cindent ' are on in C files, etc. $ "Also Load indent files, to automatically do language-dependent indenting. - filetype plugin indent on -  - "Put These in a autocmd group, so, we can delete them easily. A Augroup Vimrcex +au! the  - "For all the text files set ' TextWidth ' to characters. $Autocmd FileType Text setlocal textwidth= + the  the "When editing a file is always the known cursor position. the "Don ' t does it when the position are invalid or when inside an event handler the "(happens when dropping a file is on Gvim). -Autocmd Bufreadpost * in\ifLine"' \ '") >0&& Line ("' \ '") <= Line ("$") | the\ EXE"normal g ' \ ""| the \ endif About  the Augroup END the  the Else +  - SetAutoindent"Always set autoindenting on the Bayiendif"Has ("Autocmd")

This article reprinted, unknown specific blog = = | | |

2015-11-11 23:01

VI, VIM configuration up and down ARROW keys and delete keys

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.