把下面这段话存到~/.vimrc就可以了.

" 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")

vim上下左右键输出A B的更多相关文章

  1. ubuntu中vim下按上下左右键时输入A、B、C、D的问题

    ubuntu下使用vi 进行编辑文件时,按上下左右键时,会输入A.B.C.D,这个用起来很不方便.网上查得此问题的原因是: ubuntu系统自带的 vi 不完整导致,解决方法:安装完整的vi $ su ...

  2. Ubuntu使用vim编辑器时出现上下左右键变成ABCD

    今天在配置安装php时,要打开配置文件做些修改,肯定是要使用到vim编辑器的,我按照之前的使用命令之类的,在用到上下左右键时居然出现了ABCD,这我就纳闷了,难道Ubuntu的vim编辑器和别的不一样 ...

  3. 在tmux中的vi 上下左右键变为了ABCD等字符

    在本机上用vim编辑时,上下左右键没有问题,但是在tmux中确出现ABCD等字符. 原因是在tmux这个终端,默认做了字符转换,网上搜了很多答案,解决问题的设置是: set term=xterm

  4. vim 上下左右变成ABCD 解决办法

    一.缘由 一次发现VIM编辑文件,发现上下左右键变输入ABCD.猜测vimrc没设置好. 二.解决办法: ls -l /etc/ |grep vim,发现有两个结果vimrc.rpmnew,vimrc ...

  5. ubuntu vi上下左右键无法使用?

    使用vm安装ubuntu出现vi上下左右键无法正常使用. 执行以下两句就可以了 $sudo apt-get remove vim-common    $sudo apt-get install vim

  6. 【linux】ubuntu中上下左右键变为^[[A^[[B^[[D^[[C问题处理

    问题现象: 使用上下左右键时,结果为 ^[[A^[[B^[[D^[[C,如图: 原因在于ubuntu系统自带的 vi 不完整导致. 解决方法:安装完整的vi $ sudo apt-get instal ...

  7. Oracle sqlplus中退格键、DEL键、上下左右键无法使用乱码问题

    功能描述:Oracle sqlplus中退格键.DEL键.上下左右键无法使用乱码 1.安装readline-8.0 ①下载readline-8.0.tar.gz文件,百度网盘下载路径: https:/ ...

  8. java 事件处理机制:按下上下左右键控制小球的运动

    /** * 加深对事件处理机制的理解 * 通过上下左右键来控制一个小球的位置 */package com.test3;import java.awt.*;import javax.swing.*;im ...

  9. ArcEngine中使用上下左右键移动地图

    转自愿文ArcEngine中使用上下左右键移动地图 因项目需要,需对mapcontrol控件响应上下左右键,从网上找的方法都一样,都值提到了需要设置axMapControl1的KeyIntercept ...

随机推荐

  1. 75道阿里Java面试题,你能答上几道?

    整理了下阿里近几年的java面试题目,大家参考下吧,希望对大家有帮助,可以帮大家查漏补缺. 答对以下这些面试题,可以淘汰掉 80 % 的求职竞争者. 1.hashcode相等两个类一定相等吗?equa ...

  2. MTK 锁屏配置

    常常我们开 发程序的时候我们不需要系统唤醒系统锁屏功能,用户有时候在看电视或视频的时候不希望系统的锁屏 功能启动,既不想锁频,然而系统却在我们看电视或者视频的时候出来个锁屏的界面进行锁频拉,我们还要想 ...

  3. 个人Android开发习惯[转载]

    以下内容转载自牛人博客,很多牛叉内容,请点击:http://www.stay4it.com/?p=281 Android三年,现在写代码,真心没什么很大的兴趣,每天都是优化代码,优化框架,技术支持.非 ...

  4. Layui:设置select下拉框自动选中某项

    1.问题:layUI,在做编辑功能有下拉框数据时,需要初始化选中某个值,layUI官网没有相关api,可能我比较笨没找到 2.解决思路:出发点击事件 3.分析dom树结构,出发dl点击事件 方法: v ...

  5. 8 -- 深入使用Spring -- 3...1 Resource实现类ServletContextResource

    8.3.1 Resource实现类------ServletContextResource:访问相对于ServletContext路径下的资源的实现类. 4.访问应用相关资源 Spring提供了Ser ...

  6. 反射简介—C#特性和反射

    .NET编译器的任务之一就是为所有定义和引用的类型生成元数据描述.除了程序集中标准的元数据外,.NET平台还支持特定(attribute)把更多的元数据嵌入到程序集中. .NET特性扩展了抽象的Sys ...

  7. ios开发之--AVAudioPlayer/AVPlayer的应用

    项目当中用到了音频播放器,所以就参考官方文档,写了一个,代码如下: .h #import <UIKit/UIKit.h> @interface hAudioPlayViewControll ...

  8. 利用广播实现ip拨号——示例

    1.创建activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/androi ...

  9. java-使用SImpleDateFormat格式化时间输出

    之前有篇博客是使用NSDateFormatter来对时间进行格式化输出,但使用起来有点繁琐,今天介绍下最近刚刚使用的SimpleDateFormat. public class SimpleDateF ...

  10. java List分批处理

    java List分批处理,例如对List中的数据进行批量插入. 方法一: /** * ClassName:Test List分批处理 * @author Joe * @version * @sinc ...