V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iloveyou
V2EX  ›  Vim

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

  •  
  •   iloveyou · 2012-10-16 15:29:22 +08:00 · 3536 次点击
    这是一个创建于 4420 天前的主题,其中的信息可能已经有所发展或是发生改变。
    5 条回复    1970-01-01 08:00:00 +08:00
    alexzhou
        1
    alexzhou  
       2012-10-16 15:40:30 +08:00
    对vim不熟悉 能不能修改zencoding 绑定的键 比如从回车改成其他键?
    humiaozuzu
        2
    humiaozuzu  
       2012-10-16 15:49:11 +08:00
    贴配置吧。
    iloveyou
        3
    iloveyou  
    OP
       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
        4
    humiaozuzu  
       2012-10-16 16:07:45 +08:00
    看了下配置,看不出问题在哪。。。

    打下广告,lz可以试试我的配置:Ctrl + j 调用zencoding,其余补全一律tab
    https://github.com/humiaozuzu/dot-vimrc
    iloveyou
        5
    iloveyou  
    OP
       2012-10-16 16:10:37 +08:00
    @humiaozuzu 对了 我还装了snipmate
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2764 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 13:24 · PVG 21:24 · LAX 05:24 · JFK 08:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.