mac vim下zencoding占用回车键,导致无法用回车键换行,输入if变成<if></if>。zencoding的热键我也改成其他的了。谁有解?

2012-10-16 15:29:22 +08:00
 iloveyou
3557 次点击
所在节点    Vim
5 条回复
alexzhou
2012-10-16 15:40:30 +08:00
对vim不熟悉 能不能修改zencoding 绑定的键 比如从回车改成其他键?
humiaozuzu
2012-10-16 15:49:11 +08:00
贴配置吧。
iloveyou
2012-10-16 15:58:31 +08:00
" disable VI's compatible mode..

set nocompatible

" set encoding=utf-8

set fileencodings=ucs-bom,utf-8,gbk,default,latin1

" use chinese help

set helplang=cn
" autoload _vimrc
autocmd! bufwritepost _vimrc source %

" Enable syntax highlight

syntax enable
syntax on

filetype indent on
filetype plugin on
filetype plugin indent on
set autoindent
colo murphy

" Show line number

set nu

" show matching bracets

set showmatch



" Basic editing options

set expandtab

set shiftwidth=2

set guifont=Monaco:h15

au FileType html,python,vim,javascript setl shiftwidth=2

au FileType html,python,vim,javascript setl tabstop=2

au FileType java,php setl shiftwidth=4

au FileType java,php setl tabstop=4

set cursorline

set smarttab

set lbr

set tw=0



"Auto indent

set ai



" Smart indet

set si



" C-style indeting

set cindent



" Wrap lines

set wrap
" Sets how many lines of history VIM har to remember

set history=400



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

set autoread



" Have the mouse enabled all the time:

set mouse=a



" Do not redraw, when running macros.. lazyredraw

set lz



" set 7 lines to the curors - when moving vertical..

set so=7



" The commandbar is 2 high

set cmdheight=2



" Change buffer - without saving

set hid



" Ignore case when searching

" set ignorecase

set incsearch



" Set magic on

set magic



" No sound on errors.

set noerrorbells

set novisualbell

set t_vb=



" How many tenths of a second to blink

set mat=4



" Highlight search things

set hlsearch



" Turn backup off

set nobackup

set nowb

set noswapfile

set smartindent

" smart backspace

set backspace=start,indent,eol

set runtimepath^=~/.vim/bundle/ctrlp.vim
set runtimepath^=~/.vim/bundle/zencoding-vim
" switch buffers with Tab

let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:user_zen_expandabbr_key = '<c-m>' "设置为commend+e展开
let g:use_zen_complete_tag = 1
map <C-Tab> :bn<CR>

map <S-Tab> :bp<CR>
" NERDTree

map <F8> :NERDTreeToggle<CR>
autocmd BufNewFile,BufRead *.html.erb set filetype=html.eruby

@alexzhou
@humiaozuzu
humiaozuzu
2012-10-16 16:07:45 +08:00
看了下配置,看不出问题在哪。。。

打下广告,lz可以试试我的配置:Ctrl + j 调用zencoding,其余补全一律tab
https://github.com/humiaozuzu/dot-vimrc
iloveyou
2012-10-16 16:10:37 +08:00
@humiaozuzu 对了 我还装了snipmate

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/50128

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX