实现的基本功能

  1. 中文解决乱码问题
  2. 鼠标右键原样粘贴
  3. 最后一次编辑文件后,鼠标位置的记忆

if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif
set encoding=utf-8 set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time " Only do this part when compiled with support for autocommands
if has("autocmd")
augroup redhat
autocmd!
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif " Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif filetype plugin on if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif " Don't wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"

FreeBSD的VIM基本配置的更多相关文章

  1. [转] vim自定义配置 和 在ubnetu中安装vim

    Ubuntu 12.04安装vim和配置   问题: ubuntu默认没有安装vim,出现: jyg@ubuntu:~$ vim test.cThe program 'vim' can be foun ...

  2. FreeBSD从零开始---安装后配置(一)

    一.安装后配置   上次我们说到FreeBSD的安装,这次我们说FreeBSD安装后的配置和简单优化方法.   安装完BSD只是服务器提供服务这条万里长征路的开始,还需要一些基本的设定和优化.不过实际 ...

  3. 为了让vi命令也可以使用vim的配置,需要修改 vi /etc/bashrc 增加一行 alias vi='vim'此时,经过上面配置已经可以显示语法高亮了

    为了让vi命令也可以使用vim的配置,需要修改 vi /etc/bashrc 增加一行 aliasvi='vim'此时,经过上面配置已经可以显示语法高亮了

  4. linux环境下Vim的配置

    原文链接:http://blog.chinaunix.net/uid-26826958-id-3272375.html  (本文转自此链接中的部分内容,但做了适当修改) 安装vim命令:sudo ap ...

  5. windows下LINUX模拟终端Cypwin以及Vim的配置使用

    Cypwin的安装 从官网下载相应版本后,直接安装. 官网地址:Cypwin 安装过程中可以选择相应的Packages,我们需要安装的Vim就需要在这一步中选择相应的包. Cypwin的使用 纯命令行 ...

  6. VIM简单配置

    配置vim配置 编辑配置文件 feng@mint ~ $ vim ~/.vimrc 配置如下 主要配置为自动换行,设置行号,设置tab键为4个空格,同时将tab键自动转换成空格 set autoind ...

  7. macOS中Vim基本配置,颜色主题/语法/indent设置

    macOS中Vim基本配置 Vim的初始化配置 .vimrc 存放位置 macOS 环境下 vim 的初始化配置文件为 .vimrc , 通常有两个(系统版本和用户版本),一个位于 /usr/shar ...

  8. vim基本配置备份

    我的vim基本配置如下,在这里作个备份: set background=light syntax on set number set smartindent set expandtab set tab ...

  9. Linux - vim安装 配置与使用

    一 Vim 简单介绍 曾经一直用vi,近期開始使用 vim,以下将两者做一下比較. vi和vim都是word=%E5%A4%9A%E6%A8%A1&fr=qb_search_exp&i ...

随机推荐

  1. 逻辑斯蒂回归3 -- 最大熵模型之改进的迭代尺度法(IIS)

    声明: 1,本篇为个人对<2012.李航.统计学习方法.pdf>的学习总结,不得用作商用.欢迎转载,但请注明出处(即:本帖地址). 2,因为本人在学习初始时有非常多数学知识都已忘记.所以为 ...

  2. Android Studio Mac 快捷键整理分享

    代码高亮 OSX:Shift + Cmd + F7 Win/Linux:Alt + J 代码高亮向上查找 OSX:Shift + Cmd + G Win/Linux:Shift + F3 代码高亮向下 ...

  3. ajax传对象或者数组到后端

    ajax是无法直接传送对象或者数组,有些人自己处理的话,能够把数据依照自己的标准连接成一个字符串,然后到后端处理.可是数据的不确定性.导致有可能会出错.并且麻烦 事实上有开源的包,能够直接解释成jso ...

  4. JS禁用右键+禁用Ctrl+u+禁用F12

    第一种方法: , , ]; document.oncontextmenu = new Function("event.returnValue=false;"),//禁用右键 doc ...

  5. 第14章3节《MonkeyRunner源代码剖析》 HierarchyViewer实现原理-HierarchyViewer实例化

    既然要使用HierarchyViewer来获取控件信息,那么首先我们看下在脚本中.我们是怎么获得HierarchyViewer的,看以下一段脚本代码: 1 device = MonkeyRunner. ...

  6. RDLC报表钻取空白页问题

    在改动报表查询条件时,钻取页突然空白了,百思不得其解,之前好好的,研究了一个下午和一个晚上.查资料等等,网上非常多资料都是设置报表的 ConsumeConteinerWhitespace = True ...

  7. 2016.04.25,英语,《Vocabulary Builder》Unit 18

    capit, from the Latin word for 'head', caput ['keɪpət] n.头,首 , turns up in some pretty important pla ...

  8. ReflectionSugar 通用反射类

    http://www.cnblogs.com/sunkaixuan/p/4635710.html

  9. 神经网络中的激活函数——加入一些非线性的激活函数,整个网络中就引入了非线性部分,sigmoid 和 tanh作为激活函数的话,一定要注意一定要对 input 进行归一话,但是 ReLU 并不需要输入归一化

    1 什么是激活函数? 激活函数,并不是去激活什么,而是指如何把“激活的神经元的特征”通过函数把特征保留并映射出来(保留特征,去除一些数据中是的冗余),这是神经网络能解决非线性问题关键. 目前知道的激活 ...

  10. AIX的系统备份

    AIX克隆盘即AIX的rootvg的备用替换磁盘,用于保留AIX的原始状态,它可作为软件的升级后出现问题快速回退到原系统的备份手段,也可用于测试两个不同版本的AIX系统.系统可保留两块引导磁盘,而且都 ...