vim配置方法
/etc/vimrc (公共的)
~/.vimrc (私人的)
rpm -qa|grep vim 这个命令,如何vim已经正确安装,则会显示上面三个包的名称
全部安装
yum -y install vim*
Control+P/Control+n代码自动补全
yum install automake
注:在按下esc键后,会稍等一会才会出现注释,不要着急~~时间很短的
注意:如果是“//”注释,那需要执行两次该操作,如果是“#”注释,一次即可
1.首先在命令模式下,输入“:set nu”显示行号;
2.通过行号确定你要删除的行;
3.命令输入“:32,65d”,回车键,32-65行就被删除了,很快捷吧
我的vim配置:
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
,latin1
endif
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
" 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
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ && 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=m
set t_Sf=m
endif
" Don't wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"
set nu
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
set mouse=aset fileencodings=utf-8,gbk
vim配置方法的更多相关文章
- (转) 共享个很棒的vim配置
发现了一个很棒的vim配置方法,现在共享给大家. https://github.com/kepbod/ivim ivim - The Vim Distribution of Xiao-Ou Zha ...
- Vim常用插件安装及配置方法
Vundle 安装 git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 配置 vimrc首部添 ...
- acm的ubuntu (ubuntu16.04 安装指南,chrome安装,vim配置,git设置和github,装QQ)
日常手贱把ubuntu14.04更新到了16.04,然后就game over了.mdzz,不然泥萌也看不到这篇博客了=.= 然后花了些时间重装了一个16.04版的,原来那个14.04的用可以用,就是动 ...
- VIM配置相关记录
把一直使用中的vim配置做个GIT入库管理,也把之前积累在机器上的文档,做个汇总. https://github.com/wujuguang/kyvim 1. 安装完整版vim vi和vim的区别?在 ...
- sqlplus 配置方法及相关命令
sqlplus 配置方法及相关命令 1.配置文件 1.1 全局模式什么叫全局模式呢:当我们配置完sqlplus工具加载配置文件后,无论在哪个目录下登陆数据库,您设置[sqlplus提示符样子,在任何目 ...
- Vim配置IDE开发环境
我的vim IDE界面: 1.安装Vim和Vim基本插件首先安装好Vim和Vim的基本插件.这些使用apt-get安装即可:lingd@ubuntu:~/arm$sudo apt-get instal ...
- Ubuntu下QT控制台程序无法运行的解决方案以及XTerm的配置方法
Ubuntu下QT控制台程序无法运行的解决方案以及XTerm的配置方法 最近由于老师要求要在Ubuntu下QT上进程多线程服务器的开发,虽然只是单纯的调用qt的network模块,但是为了避免麻烦,我 ...
- Linux环境下Swap配置方法
Linux环境下Swap配置方法 场景: 今天下午安装一个CentOS6.5操作系统,忘记配置swap分区.看看如何安装系统之后,增加和删除swap分区.方法如下:1.内存占用情况[root@josh ...
- centos7网络配置方法
方法一:nmtui 这个是字符界面的图形化网络配置工具 方法二:nmcli 命令行配置 方法三:直接vim /etc/sysconfig/network-scripts/ens---- 编辑 ...
随机推荐
- Linux 查看磁盘空间大小
(1)查看文件大小 1. 查看当前文件夹下所有文件大小(包括子文件夹) du -sh 2.查看var目录下文件大小 du -sh var 3.查看指定文件夹下所有文件大小(包括子文件 ...
- sublime text 个性设置
http://stackoverflow.com/questions/13781833/sublime-text-2-how-to-change-the-font-size-of-the-file-s ...
- jQuery调用后台方法
前台: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.as ...
- MySQL用法
查询数据库表 通过查询INFORMATION_SCHEMA.TABLES查询数据库表的结构信息 SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TAB ...
- CLR via C# 随记
使用C# 编译器的方法: 1.csc.exe位于C:\Windows\Microsoft.NET\Framework\vxxxxx下面,将对应版本的路径配置到环境变量path中,如将";C: ...
- Split Array Largest Sum
Given an array which consists of non-negative integers and an integer m, you can split the array int ...
- 用C语言把双向链表中的两个结点交换位置,考虑各种边界问题。
用C语言把双向链表中的两个结点交换位置,考虑各种边界问题. [参考] http://blog.csdn.net/silangquan/article/details/18051675
- 手动安装python后,交互模式下退格键乱码
没有安装readline相关的模块 yum install readline readline-devel 再重新变异安装python就可以了
- irssi忽略退出,加入消息
IRSSI: IGNORE JOINS, PARTS, QUITS AND NICKS MESSAGES I use IRC on a daily basis and my client of cho ...
- Selenium FF WebDriver运行时开启firebug的2种方式
上一次我实测FF webdriver 加载firefoxhttp://www.cnblogs.com/tobecrazy/p/3997375.html 那么问题就来了,既然能加载firebug能否在运 ...