vi、vim 配置上下左右方向键和删除键
vi、vim 配置上下左右方向键和删除键
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2002 Sep 19
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc " When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif " Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible " allow backspacing over everything in insert mode
set backspace=indent,eol,start if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
endif
set history= " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g") " Don't use Ex mode, use Q for formatting
map Q gq " This is an alternative that also works in block mode, but the deleted
" text is lost and it only works for putting the current register.
"vnoremap p "_dp " Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > || has("gui_running")
syntax on
set hlsearch
endif " Only do this part when compiled with support for autocommands.
if has("autocmd") " Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on " Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au! " For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth= " When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif augroup END else set autoindent " always set autoindenting on endif " has("autocmd")
本文转载,未知具体博客 = = |||
2015-11-11 晚23:01
vi、vim 配置上下左右方向键和删除键的更多相关文章
- 让ubuntu开启ssh服务以及让vi/vim正常使用方向键与退格键
VIM 修复方法: 安装vim full版本,在full版本下键盘正常,安装好后同样使用vi命令.ubuntu预装的是vim tiny版本,而需要的是vim full版本.执行下面的语句安装vim f ...
- vi/vim编辑器的基本操作
vi/vim编辑器的基本操作 Contents 1. 工具准备(下载gvim) 2. vi/vim基本入门 2.1. 安装 2.2. 基本使用 3. vi/vim基本命令表 1 工具准备(下载gvim ...
- windows下vi/vim编辑器的基本操作
windows下vi/vim编辑器的基本操作 Contents 1. 工具准备(下载gvim) 2. vi/vim基本入门 2.1. 安装 2.2. 基本使用 3. vi/vim基本命令表 1 工具准 ...
- Vi快捷操作 vim配置【shell文件格式从windows转换为linux】
vim配置 http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html gg 首行 dd 删除当前行 :.,$d 删除全部内容 :se ...
- 新手指南:Linux上vi(vim)编辑器使用教程
vi(vim)是上Linux非常常用的编辑器,很多Linux发行版都默认安装了vi(vim).vi(vim)命令繁多但是如果使用灵活之后将会大大提高效率.vi是“visual interface”的缩 ...
- Linux 磁盘管理,Linux vi/vim
一.Linux 磁盘管理 Linux磁盘管理好坏直接关系到整个系统的性能问题. Linux磁盘管理常用三个命令为df.du和fdisk. df:列出文件系统的整体磁盘使用量 du:检查磁盘空间使用量 ...
- linux vi/vim 编辑器学习总结
linux vi/vim 编辑器学习总结 很多时候我们开发人员不可避免的会涉及到项目部署,这个时候使用的就不是我们所熟知的 Windows 和 Mac OS 操作系统了,而是类 Unix 系统.项目部 ...
- Linux上vi(vim)编辑器使用教程
vi(vim)是上Linux非常常用的编辑器,很多Linux发行版都默认安装了vi(vim).vi(vim)命令繁多但是如果使用灵活之后将会大大提高效率.vi是“visual interface”的缩 ...
- Env:VIM配置
注:文章来自于http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配 ...
随机推荐
- Java面试题之Request对象的主要方法
setAttribute(String name,Object):设置名字为name的request的参数值 getAttribute(String name):返回由name指定的属性值 getAt ...
- Android入门——UI(9)
SwipRefreshLayout下拉刷新控件 <?xml version="1.0" encoding="utf-8"?> <android ...
- ajax 实例
jsp页面代码: <script type="text/javascript"> var xmlHttp; function createXMLHttp(){ if(w ...
- 关于智能指针auto_ptr
智能指针auto_ptr和shared_ptr也是面试中经常被问到的一个 感觉看auto_ptr的源码反而更加容易理解一些,因为源码的代码量并不大,而且比较容易理解. 本篇主要介绍auto_ptr 其 ...
- @Resource注解(转)
@Resource 注解被用来激活一个命名资源(namedresource)的依赖注入,在JavaEE应用程序中,该注解被典型地转换为绑定于JNDI context中的一个对象.Spring确实支持使 ...
- Description:一根高筋拉面,中间切一刀,可以得到2根面条。如果先对折1次,中间切一刀,可以得到3根面条。如果连续对折2次,中间切一刀,可以得到5根面条。Input:你的程序需要解决的问题是,输入连续对折的次数。NOutput输出中间切一刀,可以得到多少根面条。
#include<iostream> using namespace std ; int main() { int n ; while(cin >> n) { << ...
- leetcode Search Insert Position Python
#Given a sorted array and a target value, return the index if the target is found. If #not, return t ...
- iOS的推送机制APNs:本地推送&远程推送
本地推送: 本地推送主要应用在备忘录,闹钟等本地的,基于时间定时的消息提醒.本篇不做详细描述. 远程推送:APNS(苹果推送通知服务) iOS远程推送机制的原理及流程: 注册推送(橙色部分):若该Ap ...
- 航频卫士APP截图
- Linux中的那些英文缩写和她的含义们
系统 man: Manual 意思是手册,可以用这个命令查询其他命令的用法. pwd:Print working directory 打印工作路径. su:Swith user 切换用户,切换到roo ...