" vim:shiftwidth=2:tabstop=8:expandtab if has('autocmd') " Remove ALL autocommands for the current group au! " Mark .asm files MASM-type assembly au BufNewFile,BufReadPre *.asm let b:asmsyntax='masm' endif if has('gui_running') let do_syntax_sel_menu=1 endif if has('gui_running') && $LANG !~ '\.' set encoding=utf-8 endif set nocompatible source $VIMRUNTIME/vimrc_example.vim set autoind...
使用 UTF-8 的編碼方式儲存,因此,您在編輯檔案時,可能看到的會是亂碼。若您使用的是 vi/vim 編輯器的話,可以在 ~/.vimrc 設定檔中加入底下幾行即可 各位大虾,请问上述的修改操作,我要怎样进行 ,我的操作系统是redhat as4.0! ------------------------------------------------ 谢谢先! 感谢cu!
我在.bash_profile设置了login_ip, 表示连接到服务器的客户IP 然后.vimrc要根据login_ip来进行配置 if $login_ip = aa ... endif if $login_ip == bb ... endif 请问这个.vimrc该怎么写。 另外,原来的.vimrc中有函数等, 是否在外面套一层if 就好了? 因为多个用户共享一个帐号,所以只能根据IP来设置.vimrc了。
set nu! 设置行号 syntax on 语法彩色 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/55904/showart_436868.html
[code] " use visual bell instead of beeping set vb " incremental search set incsearch " syntax highlighting set bg=light syntax on " autoindent autocmd FileType perl set autoindent|set smartindent " 4 space tabs autocmd FileType perl set tabstop=4|set shiftwidth=4|set expandtab|set softtabstop=4 " show matching brackets autocmd FileType perl set showmatch " show line numbers autocmd FileType...
" Vim folding file " Language: Python " Author: Jorrit Wiersma (foldexpr), Max Ischenko (foldtext), Robert " Ames (line counts) " Last Change: 2005 Jul 14 " Version: 2.3 " Bug fix: Drexler Christopher, Tom Schumm, Geoff Gerrietts setlocal foldmethod=expr setlocal foldexpr=GetPythonFold(v:lnum) setlocal foldtext=PythonFoldText() function! PythonFoldText() let line = getline(v:folds...
一个vimrc的例子 1 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 " Stuff I have decided I don't like 3 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 4 "set ignorecase -- turns out, I like case sensitivity 5 "se...
用VIM朋友如果你们愿意的话可以把你们vimrc里的一些常用配置和一些技巧贴出来大家一起共享和学习 以便使我们的vim功能更加强大写程序时更加得心应手 我先来点 基本的缩进和语言加亮 [code] set syntax=on set cinoptions+={2,0,p0,t0 set nobackup set cindent set syntax=cpp set formatoptions=tcqr [/code] 自定义文件头 [code] function Mytitle() call setline(1,"/**********************************************") cal...