SecureCRT中vim代码高亮问题
来源:互联网 发布:淘宝商城汽车音响 编辑:程序博客网 时间:2024/05/17 03:45
原创网址:http://www.phpthinking.com/archives/289
1.首先,点击SecureCRT的Options->Session Options->Terminal->Emulation,选择右侧选项框中Terminal为Linux,点击ANSI Color选项(中文SecureCRT为:选项->会话选项->终端->仿真,右侧的仿真选框)
2.进入服务器根目录
# cd /etc/
查看vimrc文件中的内容
# vim vimrc
将vimrc中的内容,替换为如下代码!
01
if
v:lang =~
"utf8$"
|| v:lang =~
"UTF-8$"
02
set fileencodings=ucs-bom,utf-8,latin1
03
endif
04
05
set nocompatible " Use Vim defaults (much better!)
06
set bs=indent,eol,start " allow backspacing over everything in insert mode
07
"set ai "
always set autoindenting on
08
"set backup "
keep a backup file
09
set viminfo=
'20,\"50 " read/write a .viminfo file, don'
t store more
10
" than 50 lines of registers
11
set history=50 " keep 50 lines of command line history
12
set ruler " show the cursor position all the time
13
14
" Only
do
this part when compiled with support
for
autocommands
15
if
has(
"autocmd"
)
16
augroup redhat
17
autocmd!
18
" In text files, always limit the width of text to 78 characters
19
autocmd BufRead *.txt set tw=78
20
" When editing a file, always jump to the last cursor position
21
autocmd BufReadPost *
22
\
if
line(
"'\""
) > 0 && line (
"'\""
) <= line(
"$"
) |
23
\ exe
"normal! g'\""
|
24
\
endif
25
" don't write swapfile on most commonly used directories
for
NFS mounts
or
USB sticks
26
autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/
var
/tmp,/tmp
27
" start with spec file template
28
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
29
augroup
END
30
endif
31
32
if
has(
"cscope"
) && filereadable(
"/usr/bin/cscope"
)
33
set csprg=/usr/bin/cscope
34
set csto=0
35
set cst
36
set nocsverb
37
" add any database in current directory
38
if
filereadable(
"cscope.out"
)
39
cs add cscope.out
40
"
else
add database pointed to by environment
41
elseif
$CSCOPE_DB
!=
""
42
cs add
$CSCOPE_DB
43
endif
44
set csverb
45
endif
46
47
" Switch syntax highlighting on, when the terminal has colors
48
" Also
switch
on highlighting the last used search pattern.
49
if
&t_Co > 2 || has(
"gui_running"
)
50
syntax on
51
set hlsearch
52
endif
53
54
filetype
plugin on
55
56
if
&term==
"xterm"
57
set t_Co=8
58
set t_Sb=[4%dm
59
set t_Sf=[3%dm
60
endif
61
62
" Don't wake up system with blinking cursor:
63
" http:
//www.linuxpowertop.org/known.php
64
let &guicursor = &guicursor .
",a:blinkon0"
3.重启SecureCRT,即可看到代码高亮效果,多次试验,无一例外!
2 0
- SecureCRT中vim代码高亮问题
- securecrt vim 颜色高亮问题
- 设置SecureCRT中vim高亮效果
- secureCRT中让vim高亮显示
- secureCRT中让vim高亮显示
- 在secureCRT中设置VIM高亮显示
- SecureCRT使用VIM时语法高亮
- SecureCRT使用VIM语法高亮
- securecrt和vim高亮显示
- secureCRT中vim行号下划线问题
- securecrt中vim行号下划线问题
- securecrt中vim行号下划线问题
- 【vim配置】secureCRT的vim高亮配置
- vim高亮问题
- secureCRT使用VIM时对语法高亮
- secureCRT使用VIM时对语法高亮
- SecureCRT 使用vim时没有高亮解决办法
- secureCRT使用VIM时对语法高亮
- nyoj22素数求和
- java-socket编程
- 硬盘的存储机制
- 加快访问网页
- hdu 1518(深搜)
- SecureCRT中vim代码高亮问题
- js将字符串转换成json的三种方式
- HDU 4607 Park Visit 求树直径
- 单板硬件设计
- nyoj40公约数和公倍数
- QML类型说明-DwmFeatures
- 一个简单公共手势滑动 抽象类
- WPF IIS 设置
- Linux常用命令总结(一)