Posts Tagged ‘vim’

27 03 2011

升级ubuntu里的vi为vim

bigCat Posted in Linux - 0 Comment
shell> sudo su\r\nshell> apt-get install vim\r\nshell> cd /etc/alternative\r\nshell> rm -f vi\r\nshell> ln -s /usr/bin/vim vi
17 09 2010

Windows 7 里 .vimrc 应该放在哪里?

bigCat Posted in NoteBook - 0 Comment

From the Vim Wiki.\r\n

在windows系统里,寻找 $HOME 最好的方法就是跑一些命令

\r\n

:version\r\n:echo expand('~')\r\n:echo $HOME\r\n:echo $VIM\r\n:echo $VIMRUNTIME\r\n

\r\n\r\n安装目录有个文件叫 vimrc_example.vim 有兴趣读一下\r\n

11 09 2010

VIM remove BOM

bigCat Posted in Linux - 0 Comment

>I use utf8, and I would like to know how to save a file with BOM\r\n>1. always added\r\n>2. always removed\r\n>3. unchanged\r\n>and what is the default behaviour of vim?\r\n\r\nRarely if ever poke utf8 files (usually find the weirdo chars and turn\r\n'em into named entities instead), but iirr, forcing a BOM is done with\r\n\r\n :set bomb\r\n\r\nforcing it off with\r\n\r\n :set nobomb\r\n\r\nand the default behavior is whatever the file has when you start to edit\r\nit, with or without.\r\n\r\nIirr, any nonascii utf8 char (>1byte) will normally force the BOM to be\r\nturned on. Might be wrong, though, and it might assume/require\r\nlittle-endian multibyte chars per the utf8 spec (ie, a BOM would be\r\nredundant), and iirr the BOM is only really required with utf16/ucs2\r\nencoding.\r\n\r\nTony M's the one to ask, though. :D\r\n\r\n\r\nThen again, there's always\r\n\r\n :help bomb\r\n\r\netc. Lis, haven't poked around with this kind of thing but on rare\r\noccasion.\r\n

Host: (miao) | Word: Press | Code: HTML5