mac vim下zencoding占用回车键,导致无法用回车键换行,输入if变成<if></if>。zencoding的热键我也改成其他的了。谁有解? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iloveyou
V2EX    Vim

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

  •  
  •   iloveyou Oct 16, 2012 4076 views
    This topic created in 4943 days ago, the information mentioned may be changed or developed.
    5 replies    1970-01-01 08:00:00 +08:00
    alexzhou
        1
    alexzhou  
       Oct 16, 2012
    对vim不熟悉 能不能修改zencoding 绑定的键 比如从回车改成其他键?
    humiaozuzu
        2
    humiaozuzu  
       Oct 16, 2012
    贴配置吧。
    iloveyou
        3
    iloveyou  
    OP
       Oct 16, 2012
    " 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
        4
    humiaozuzu  
       Oct 16, 2012
    看了下配置,看不出问题在哪。。。

    打下广告,lz可以试试我的配置:Ctrl + j 调用zencoding,其余补全一律tab
    https://github.com/humiaozuzu/dot-vimrc
    iloveyou
        5
    iloveyou  
    OP
       Oct 16, 2012
    @humiaozuzu 对了 我还装了snipmate
    About     Help     Advertise     Blog     API     FAQ     Solana     5094 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 32ms UTC 09:40 PVG 17:40 LAX 02:40 JFK 05:40
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86