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---- 编辑 ...
随机推荐
- Servlet的使用方法详细说明
Servlet的生命周期方法: init() destroy() doGet(HttpServletRequest request,HttpServletResponse response) 客户端请 ...
- linux awk, xargs
awk , 很赞的教程:http://coolshell.cn/articles/9070.html xargs, http://blog.csdn.net/andy572633/article/de ...
- CTSC2016游记
打了几天酱油.. day1 3分滚..考场上打了5+0+3,5文件名挂了. (因为5那题我会nlog^3n做法,然而只是暴力分而已.(被KDTree艹过去的一题)) 提答xjb玩了三分,原因是exgc ...
- 开发简单的Kafka应用
之前基于集群和单机安装过kafka,现在利用kafka提供的API构建一个简单的生产者消费者的项目示例,来跑通kafka的流程,具体过程如下: 首先使用eclipse for javaee建立一个ma ...
- 【Android Studio错误】 If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
解决办法:以管理员身份运行cmd窗口,输入命令“netsh winsock reset” netsh winsock reset命令,作用是重置 Winsock 目录.如果一台机器上的Winsock协 ...
- Effective C++ -----条款43:学习处理模板化基类内的名称
可在derived class templates内通过“this->“指涉base class templates内的成员名称,或藉由一个明白写出的”base class资格修饰符”完成.
- codeforces 507B. Painting Pebbles 解题报告
题目链接:http://codeforces.com/problemset/problem/509/B 题目意思:有 n 个piles,第 i 个 piles有 ai 个pebbles,用 k 种颜色 ...
- SprignMVC+myBatis整合
转载自:http://lydia-fly.iteye.com/blog/2153076 学习本节内容请先看"MyBatis的基本应用".地址:http://lydia-fly.it ...
- 解析客户端IP
<html><head><title>新浪IP解析接口的使用</title><metahttp-equiv=Content-Typecontent ...
- 【QT】C++ GUI Qt4 学习笔记3
菜单界面的实现. 看书上第三章,好长,好多代码.我敲了半天,想看看效果,结果却显示不出来.仔细一看,发现spreadsheet的实现在第四章.郁闷.... 又到官网上下代码,结果居然不能运行.难道是因 ...