Showing posts with label gvim. Show all posts
Showing posts with label gvim. Show all posts

Friday, June 10, 2011

Remove ^M in the VIM or GVIM

The ^M is the \r in the file. To remove these strange things, you could do replace \r by space. Very simple.

Wednesday, February 23, 2011

解决UBUNTU下GVIM等显示中文为乱码的问题

由于WINDOWS下的汉字一般默认是GB格式,而UBUNTU下的汉字是UTF8,所以UBUNTU不能正常显示WINDOWS下书写的汉字,
比较笨拙的解决办法是下载安装zh-autoconverter,使用命令autob5来进行转换。

另外一个在GVIM上比较好的方法是,打开.vimrc,
添加以下命令:

let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936

果然问题解决了。。。

Saturday, January 15, 2011

vim-latexsuit on ubuntu 11.04

After using apt-get to install this suit, it can not work still, but add follow lines in the .vimrc file, it start to work:


" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'


set shiftwidth=4
set cindent
syntax on
colo desert


set spell spelllang=en_us
" zg to add word to word list
" zw to reverse
" zug to remove word from word list
" z= to get list of possibilities
set spellfile=~/.vim/spellfile.add

Wednesday, January 12, 2011

Change the gvim default font

I start to use a new big screen, the default font of vim becomes so small.

I start to search methods that can solve it:
Add follow line to ~/.vimrc:
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12

Here Bitstream\ Vera\ Sans\ Mono\ is the type of the font, and 12 is its size.

Friday, June 13, 2008

How to match pair of braces in gvim??

you can use % to find a pair of {} or () // etc.....

see more :http://www.moolenaar.net/habits.html