`
zccst
  • 浏览: 3315567 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

secureCRT彩色字体设置

 
阅读更多
作者:zccst


一、服务器端用户目录设置
批注:至此今天(2012-8-15),我才知道在linux上,每一个用户都有自己的一套环境,包括./vimrc,此外还有bashrc等。

代码颜色设置(文件夹颜色修改详见:http://zccst.iteye.com/blog/1901544

复制下面代码到~/.vimrc。注意,我也同时追加代码到/etc/vimrc

" ==============================================   
" General settings   
" ==============================================   
set nocp   
set ru   
set nu   
"set cin   
"set cino = :0g0t0(sus   
set sm   
set ai   
set sw=4  
set ts=4  
set noet   
set lbr   
set hls   
"set backspace = indent , eol , start   
"set whichwrap = b , s , < , > , [ , ]   
"set fo+ = mB   
set selectmode =   
"set mousemodel = popup  
set keymodel =   
"set selection = inclusive  
"set matchpairs+ =   
" ==============================================   
" Cursor movement   
" ==============================================   
"nnoremap gj   
"nnoremap gk   
"vnoremap gj   
"vnoremap gk   
"inoremap gj   
"inoremap gk   
"nnoremap g$   
"nnoremap g0   
"vnoremap g$   
"vnoremap g0   
"inoremap g$   
"inoremap g0   
"nmap :confirm bd   
"vmap :confirm bd   
"omap :confirm bd   
"map! :confirm bd   
syntax on   
set foldmethod=syntax  
if (has( " gui_running " ))   
set nowrap   
set guioptions+=b   
colo inkpot   
else   
set wrap   
colo ron   
endif   
"let mapleader = " , "  
if !has("gui_running")   
set t_Co=8  
set t_Sf=^[[3%p1%dm   
set t_Sb=^[[4%p1%dm   
endif  



版本二:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer: 
"       Amir Salihefendic
"       http://amix.dk - amix@amix.dk
"
" Version: 
"       5.0 - 29/05/12 15:43:36
"
" Blog_post: 
"       http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
"
" Awesome_version:
"       Get this config, nice color schemes and lots of plugins!
"
"       Install the awesome version from:
"
"           https://github.com/amix/vimrc
"
" Syntax_highlighted:
"       http://amix.dk/vim/vimrc.html
"
" Raw_version: 
"       http://amix.dk/vim/vimrc.txt
"
" Sections:
"    -> General
"    -> VIM user interface
"    -> Colors and Fonts
"    -> Files and backups
"    -> Text, tab and indent related
"    -> Visual mode related
"    -> Moving around, tabs and buffers
"    -> Status line
"    -> Editing mappings
"    -> vimgrep searching and cope displaying
"    -> Spell checking
"    -> Misc
"    -> Helper functions
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=700

" Enable filetype plugins
filetype plugin on
filetype indent on

" Set to auto read when a file is changed from the outside
set autoread

" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","

" Fast saving
nmap <leader>w :w!<cr>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the cursor - when moving vertically using j/k
set so=7

" Turn on the WiLd menu
set wildmenu

" Ignore compiled files
set wildignore=*.o,*~,*.pyc

"Always show current position
set ruler

" Height of the command bar
set cmdheight=2

" A buffer becomes hidden when it is abandoned
set hid

" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l

" Ignore case when searching
set ignorecase

" When searching try to be smart about cases 
set smartcase

" Highlight search results
set hlsearch

" Makes search act like search in modern browsers
set incsearch

" Don't redraw while executing macros (good performance config)
set lazyredraw

" For regular expressions turn magic on
set magic

" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2

" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable

colorscheme desert
set background=dark

" Set extra options when running in GUI mode
if has("gui_running")
    set guioptions-=T
    set guioptions+=e
    set t_Co=256
    set guitablabel=%M\ %t
endif

" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8

" Use Unix as the standard file type
set ffs=unix,dos,mac


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab

" Be smart when using tabs ;)
set smarttab

" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4

" Linebreak on 500 characters
set lbr
set tw=500

set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines


""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :call VisualSelection('f')<CR>
vnoremap <silent> # :call VisualSelection('b')<CR>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Treat long lines as break lines (useful when moving around in them)
map j gj
map k gk

" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
map <space> /
map <c-space> ?

" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>

" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l

" Close the current buffer
map <leader>bd :Bclose<cr>

" Close all the buffers
map <leader>ba :1,1000 bd!<cr>

" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove

" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/

" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>

" Specify the behavior when switching between buffers 
try
  set switchbuf=useopen,usetab,newtab
  set stal=2
catch
endtry

" Return to last edit position when opening files (You want this!)
autocmd BufReadPost *
     \ if line("'\"") > 0 && line("'\"") <= line("$") |
     \   exe "normal! g`\"" |
     \ endif
" Remember info about open buffers on close
set viminfo^=%


""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2

" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Editing mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remap VIM 0 to first non-blank character
map 0 ^

" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z

if has("mac") || has("macunix")
  nmap <D-j> <M-j>
  nmap <D-k> <M-k>
  vmap <D-j> <M-j>
  vmap <D-k> <M-k>
endif

" Delete trailing white space on save, useful for Python and CoffeeScript ;)
func! DeleteTrailingWS()
  exe "normal mz"
  %s/\s\+$//ge
  exe "normal `z"
endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS()


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => vimgrep searching and cope displaying
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" When you press gv you vimgrep after the selected text
vnoremap <silent> gv :call VisualSelection('gv')<CR>

" Open vimgrep and put the cursor in the right position
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>

" Vimgreps in the current file
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>

" When you press <leader>r you can search and replace the selected text
vnoremap <silent> <leader>r :call VisualSelection('replace')<CR>

" Do :help cope if you are unsure what cope is. It's super useful!
"
" When you search with vimgrep, display your results in cope by doing:
"   <leader>cc
"
" To go to the next search result do:
"   <leader>n
"
" To go to the previous search results do:
"   <leader>p
"
map <leader>cc :botright cope<cr>
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
map <leader>n :cn<cr>
map <leader>p :cp<cr>


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>

" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm

" Quickly open a buffer for scripbble
map <leader>q :e ~/buffer<cr>

" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>



"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! CmdLine(str)
    exe "menu Foo.Bar :" . a:str
    emenu Foo.Bar
    unmenu Foo
endfunction

function! VisualSelection(direction) range
    let l:saved_reg = @"
    execute "normal! vgvy"

    let l:pattern = escape(@", '\\/.*$^~[]')
    let l:pattern = substitute(l:pattern, "\n$", "", "")

    if a:direction == 'b'
        execute "normal ?" . l:pattern . "^M"
    elseif a:direction == 'gv'
        call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
    elseif a:direction == 'replace'
        call CmdLine("%s" . '/'. l:pattern . '/')
    elseif a:direction == 'f'
        execute "normal /" . l:pattern . "^M"
    endif

    let @/ = l:pattern
    let @" = l:saved_reg
endfunction


" Returns true if paste mode is enabled
function! HasPaste()
    if &paste
        return 'PASTE MODE  '
    en
    return ''
endfunction

" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
   let l:currentBufNum = bufnr("%")
   let l:alternateBufNum = bufnr("#")

   if buflisted(l:alternateBufNum)
     buffer #
   else
     bnext
   endif

   if bufnr("%") == l:currentBufNum
     new
   endif

   if buflisted(l:currentBufNum)
     execute("bdelete! ".l:currentBufNum)
   endif
endfunction




关于中文乱码:
1,修改远程linux机器的配置
vim /etc/sysconfig/i18n
把LANG改成支持UTF-8的字符集
如:
LANG=”zh_CN.UTF-8″
或者是
LANG=”en_US.UTF-8″

2,还有就是:客户端securecrt的设置了。会话-->Appearance-->字符编码  UTF-8


二、客户端设置
文件颜色设置

1,选择xterm.

options -> session options --> emulation

Terminal选项:xterm  勾上ANSI Color 包括use color scheme。



2,颜色方案

options -> session options -> appearance

选择traditional



3,全局配置

options -> Global Options -> ANSI Color

Normal colors 选择default。



应用即可。



如果没有显示出颜色,而且你确认你的终端支持颜色显示,请先退出VIM,输入如下命令:

TERM=xterm-color; export TREM

用于告诉VIM你的终端是支持颜色显示的。








退出secureCRT,重新登录,源码已经变为彩色了。
分享到:
评论

相关推荐

    securecrt设置字体颜色

    下面将详细介绍如何在SecureCRT中设置字体颜色。 1. 启动SecureCRT软件并打开会话: 首先,启动SecureCRT应用程序,然后点击“文件”菜单,选择“新建会话”或打开已有的会话连接到你的远程服务器。 2. 进入会话...

    SecureCRT颜色设置-推荐.docx

    SecureCRT颜色设置详解 SecureCRT是一款功能强大且流行的远程桌面连接工具,提供了丰富的自定义选项,可以...通过自定义SecureCRT的颜色设置、光标设置和字体设置,可以提高工作效率和可读性,满足不同的使用需求。

    SecureCRT 关键字配色显示

    ### SecureCRT 关键字配色显示方案解析 #### 一、引言 SecureCRT是一款功能强大的终端模拟器软件,广泛应用于远程登录管理网络设备。为了提高运维效率与体验,用户通常会自定义各种配置,其中之一便是关键字配色...

    如何设置SecureCRT窗口输出代码关键字高亮

    这里`DEVICE`是我们想要高亮显示的关键字,`ForegroundColor`和`BackgroundColor`分别用于指定字体颜色和背景颜色。您可以根据个人喜好自由设置这些值。 **第六步:进入会话选项并启用高亮** - 返回SecureCRT,...

    secureCRT配色方案

    设置字体颜色 - **原因**:默认的白色字体可能会导致眼睛不适。 - **操作步骤**:Options -&gt; Global Options -&gt; Terminal -&gt; Appearance -&gt; ANSI Color, Default - **颜色选择**:可以选择一个与新背景色对比明显...

    SecureCRT 配色方案.rar

    首先,"SecureCRT 配色方案.doc"可能包含了一套综合性的配色设定,包括字体颜色、背景颜色、高亮颜色等,这些设定旨在提供清晰、对比度适中的显示效果,使用户在长时间使用SecureCRT时仍能保持良好的视力。...

    SecureCRT 窗口管理工具

    - **个性化设置**:用户可以根据个人喜好调整字体、颜色、快捷键等设置。 2. **使用方法** - **安装与启动**:下载并安装SecureCRT,启动程序后,界面简洁明了,可新建会话或导入已有的配置。 - **新建会话**:...

    SecureCRT個性化設置

    例如,选择合适的字体、颜色主题,以及调整窗口布局,使得终端显示更加清晰,减少视觉疲劳。 此外,考虑到右键粘贴功能可能导致意外的复制操作,可以在“全局选项”中禁用这一功能。这样,你可以通过快捷键或菜单栏...

    securecrt使用教程、SecureCRT.docx

    2. 终端颜色配置:SecureCRT 的终端颜色配置可以根据用户的需求进行设置,包括字体配置、颜色方案选择等。 3. 文件传输:SecureCRT 支持多种文件传输协议,包括 ASCII、Xmodem、Ymodem、Zmodem 等。 4. 上传下载:...

    secureCRT设置参数

    在实际操作中,可能还会遇到如乱码、延迟等问题,这些可以通过调整SecureCRT的终端设置来解决,如修改字体、颜色、编码格式等。如果连接不稳定,检查硬件连接、线路质量,或尝试调整SecureCRT的超时设置。 最后,...

    SecureCRT 支持中文

    4. **颜色主题**:为了满足中文用户的阅读习惯,SecureCRT允许自定义颜色主题,包括字体颜色、背景颜色等,使得中文字符在终端上更加清晰易读。 5. **脚本与宏支持**:SecureCRT支持自定义脚本和宏,这在处理大量...

    SecureCRT中文解压版

    4. **颜色配置**:用户可以根据个人喜好或工作需求自定义终端的颜色方案,包括字体颜色、背景颜色、高亮颜色等,使得在长时间使用时减轻视觉疲劳。 5. **脚本支持**:SecureCRT支持批处理脚本,可以通过VBS或Python...

    securecrt中文乱码解决

    2. **更改SecureCRT的会话配置:** 在`Session Options`中,尝试调整`Connection &gt; SSH &gt; Terminal Type`下的设置,确保终端类型与服务器兼容。 3. **更新SecureCRT版本:** 使用最新版本的SecureCRT可以避免已知...

    SecureCRT 8.0注册方案及配色文件及加载

    在这个"SecureCRT 8.0注册方案及配色文件及加载"的主题中,我们将深入探讨如何在SecureCRT 8.0版本中进行有效的配置和个性化设置。 首先,我们来讨论注册方案。SecureCRT作为一个商业软件,通常需要购买许可证才能...

    SecureCRT SecureCRT

    其丰富的定制选项,如字体设置、颜色主题、脚本支持等,使得每个人都能根据个人喜好和工作需求调整工作环境。 总之,SecureCRT是一款功能强大的远程访问工具,它的安全性、稳定性和易用性使其在IT行业中占据重要...

    SecureCRT英文版.rar

    3. **个性化配置**:SecureCRT允许用户自定义字体、颜色、快捷键等,满足个人工作习惯。 4. **文件传输**:内置的SFTP功能,支持安全的文件上传和下载,避免了数据传输过程中的安全风险。 5. **脚本支持**:支持...

    SecureCRT的配置

    本文将详细介绍如何在SecureCRT中进行彩色字体设置以及如何配置显示中文。 #### 二、配置彩色字体 在使用SecureCRT时,默认情况下可能无法显示彩色字体,这是因为默认的终端仿真器设置并不支持彩色输出。以下步骤...

    SecureCRT7.0汉化程序

    7. **个性化设置**:汉化后的SecureCRT可以根据个人习惯进行进一步的配置,比如调整字体大小、颜色主题,以及设置快捷键等,以提高工作效率。 需要注意的是,使用非官方的汉化程序可能存在一定的风险,例如可能导致...

    SecureCRT

    8. **个性化设置**:用户可以根据个人喜好调整字体、颜色、快捷键布局等,创建符合自己工作习惯的界面。 9. **安全性**:除了SSH协议,SecureCRT还支持公钥认证、密码认证等多种身份验证方式,确保只有授权用户能够...

    SecureCRT9.2.3_x64.rar

    4. **个性化设置**:SecureCRT支持自定义字体、颜色、快捷键,可按照个人喜好调整界面布局。 5. **文件传输**:内置SFTP(SSH File Transfer Protocol)功能,可以在安全的环境下进行文件上传和下载。 6. **脚本和...

Global site tag (gtag.js) - Google Analytics