FreeBSD的VIM基本配置
实现的基本功能
- 中文解决乱码问题
- 鼠标右键原样粘贴
- 最后一次编辑文件后,鼠标位置的记忆
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基本配置的更多相关文章
- [转] vim自定义配置 和 在ubnetu中安装vim
Ubuntu 12.04安装vim和配置 问题: ubuntu默认没有安装vim,出现: jyg@ubuntu:~$ vim test.cThe program 'vim' can be foun ...
- FreeBSD从零开始---安装后配置(一)
一.安装后配置 上次我们说到FreeBSD的安装,这次我们说FreeBSD安装后的配置和简单优化方法. 安装完BSD只是服务器提供服务这条万里长征路的开始,还需要一些基本的设定和优化.不过实际 ...
- 为了让vi命令也可以使用vim的配置,需要修改 vi /etc/bashrc 增加一行 alias vi='vim'此时,经过上面配置已经可以显示语法高亮了
为了让vi命令也可以使用vim的配置,需要修改 vi /etc/bashrc 增加一行 aliasvi='vim'此时,经过上面配置已经可以显示语法高亮了
- linux环境下Vim的配置
原文链接:http://blog.chinaunix.net/uid-26826958-id-3272375.html (本文转自此链接中的部分内容,但做了适当修改) 安装vim命令:sudo ap ...
- windows下LINUX模拟终端Cypwin以及Vim的配置使用
Cypwin的安装 从官网下载相应版本后,直接安装. 官网地址:Cypwin 安装过程中可以选择相应的Packages,我们需要安装的Vim就需要在这一步中选择相应的包. Cypwin的使用 纯命令行 ...
- VIM简单配置
配置vim配置 编辑配置文件 feng@mint ~ $ vim ~/.vimrc 配置如下 主要配置为自动换行,设置行号,设置tab键为4个空格,同时将tab键自动转换成空格 set autoind ...
- macOS中Vim基本配置,颜色主题/语法/indent设置
macOS中Vim基本配置 Vim的初始化配置 .vimrc 存放位置 macOS 环境下 vim 的初始化配置文件为 .vimrc , 通常有两个(系统版本和用户版本),一个位于 /usr/shar ...
- vim基本配置备份
我的vim基本配置如下,在这里作个备份: set background=light syntax on set number set smartindent set expandtab set tab ...
- Linux - vim安装 配置与使用
一 Vim 简单介绍 曾经一直用vi,近期開始使用 vim,以下将两者做一下比較. vi和vim都是word=%E5%A4%9A%E6%A8%A1&fr=qb_search_exp&i ...
随机推荐
- POJ 3207
还是那句话,做2SAT题时,找出矛盾点基本上可解了.这道题也是这样 题意是说给出一个圆上的 n 个点(0~n-1编号),然后在指定的 m 对点之间各连一条线(可以在圆内,也可以在圆外,可以是曲线,这点 ...
- 你真懂JavaScript吗?
正文 题目1: if (!("a" in window)) { var a = 1; } alert(a); 题目2 var a = 1, b = function a(x) { ...
- Windows 10家庭版也能共享打印机(中)解除Guest账户网络登录限制,实现局域网共享
由于Windows系统默认是禁止Guest账户从网络登录的.我们须要解除这个限制.首先想到的是用组策略编辑器gpedit.msc. 可是Windows 10家庭版没有组策略编辑器,我们先尝试用U盘把W ...
- cdev_init和register_chrdev区别
--- 01:include/linux/fs.h static inline int register_chrdev(unsigned int major, const char *name, co ...
- UVa 11722(几何概率)
题意:你和你的朋友要乘坐火车,并且都会在A城市相遇,你会在(t1,t2)中的任意时刻以相同的概率密度到达, 你朋友会在(s1,s2)中的任意时刻以相同的概率密度到达,你们的火车在A城市都会停留w分钟, ...
- Wannafly挑战赛25 C 期望操作数 数学
题目 题意:给你你一个数x和一个数q,x<=q,每一次可以等概率把x变成[x,q]中任意一个数,问变成q的步数的期望,输出对998244353取模,多组询问 题解:首先肯定的是,可以预处理,因为 ...
- linux 免密登陆(超简单)
一.客户端生产公钥 在windwos上 生成公钥私钥前,先下载git哦 ssh-keygen -t rsa# 记住下方方框内公钥保存地址, 二.查看自己用户的登录地址 cat /etc/passwd ...
- C# 添加应用程序包
项目中可能会遇到某些扩展方法不可以应用的情况,这时候需要在项目中引用程序包 步骤如下: 回车即可
- Bootstrap 模态框使用
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- pinpoint体系中,关于如何清理过期hbase数据
版本: pinpoint:1.7.1 hbase:1.2.6 命令行命令: $HBASE_HOME/bin/hbase shell newrestruct.hbase 备注:保留一天半的数据(秒 ...