博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vi、vim 配置上下左右方向键和删除键
阅读量:5872 次
发布时间:2019-06-19

本文共 2603 字,大约阅读时间需要 8 分钟。

vi、vim 配置上下左右方向键和删除键

 

1 " An example for a vimrc file. 2 " 3 " Maintainer: Bram Moolenaar 
4 " Last change: 2002 Sep 19 5 " 6 " To use it, copy it to 7 " for Unix and OS/2: ~/.vimrc 8 " for Amiga: s:.vimrc 9 " for MS-DOS and Win32: $VIM\_vimrc10 " for OpenVMS: sys$login:.vimrc11 12 " When started as "evim", evim.vim will already have done these settings.13 if v:progname =~? "evim"14 finish15 endif16 17 " Use Vim settings, rather then Vi settings (much better!).18 " This must be first, because it changes other options as a side effect.19 set nocompatible20 21 " allow backspacing over everything in insert mode22 set backspace=indent,eol,start23 24 if has("vms")25 set nobackup " do not keep a backup file, use versions instead26 else27 set backup " keep a backup file28 endif29 set history=50 " keep 50 lines of command line history30 set ruler " show the cursor position all the time31 set showcmd " display incomplete commands32 set incsearch " do incremental searching33 34 " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries35 " let &guioptions = substitute(&guioptions, "t", "", "g")36 37 " Don't use Ex mode, use Q for formatting38 map Q gq39 40 " This is an alternative that also works in block mode, but the deleted41 " text is lost and it only works for putting the current register.42 "vnoremap p "_dp43 44 " Switch syntax highlighting on, when the terminal has colors45 " Also switch on highlighting the last used search pattern.46 if &t_Co > 2 || has("gui_running")47 syntax on48 set hlsearch49 endif50 51 " Only do this part when compiled with support for autocommands.52 if has("autocmd")53 54 " Enable file type detection.55 " Use the default filetype settings, so that mail gets 'tw' set to 72,56 " 'cindent' is on in C files, etc.57 " Also load indent files, to automatically do language-dependent indenting.58 filetype plugin indent on59 60 " Put these in an autocmd group, so that we can delete them easily.61 augroup vimrcEx62 au!63 64 " For all text files set 'textwidth' to 78 characters.65 autocmd FileType text setlocal textwidth=7866 67 " When editing a file, always jump to the last known cursor position.68 " Don't do it when the position is invalid or when inside an event handler69 " (happens when dropping a file on gvim).70 autocmd BufReadPost *71 \ if line("'\"") > 0 && line("'\"") <= line("$") |72 \ exe "normal g`\"" |73 \ endif74 75 augroup END76 77 else78 79 set autoindent " always set autoindenting on80 81 endif " has("autocmd")

本文转载,未知具体博客 = = |||

2015-11-11 晚23:01

转载于:https://www.cnblogs.com/shinesun/p/4957679.html

你可能感兴趣的文章
Java混乱的日志体系(logback)(转)
查看>>
How to Set Up ImpressPages 5.0 on LAMP in CentOS 7.2
查看>>
使用innotop监测mysql
查看>>
[开发笔记]-获取歌曲ID3信息
查看>>
Webpack入门教程二
查看>>
NFS配置详解
查看>>
Arduino+Avr libc制作Badusb原理及示例讲解
查看>>
thinkphp-page
查看>>
3星|《财经》2017年第29期:未来,国有资本的收益和变现都是补贴社保的渠道...
查看>>
csv文件定义:RFC 4180
查看>>
hadoop之 hadoop 机架感知
查看>>
网盘搜索
查看>>
OS X Terminal shortcuts
查看>>
发布一个 Linux 下的 C++ 多线程库
查看>>
如何在阿里技术面试中脱颖而出?(内部资料)
查看>>
jquery 随楼层滚动导航激活状态改变特效
查看>>
sun8134的Blog
查看>>
SinoBBD亮相全球云计算大会 彰显一体化云力量
查看>>
实现gridview空白处的点击事件
查看>>
如何使电脑不会重复启动同一个进程
查看>>