为什么Vim上的TeX中的反引号会消失?

时间:2017-02-21 02:41:07

标签: vim tex

当我在Vim上编辑TeX文件时,

插入模式中的反引号(`)工作奇怪。 我希望当我输入`a时,Vim会显示`a,当我输入`b时,它会显示`b,依此类推。 但实际上,当我输入`a时,它只显示a,当我输入`b时,它只显示b。 此外,当我输入时,`j会显示`j,正如我所料。 反引号后的一些字母将显示带有反引号(正如我所料),而其他字母则没有反引号(奇怪的行为)。 下面列出了哪些字母跟在反引号上以及哪些字母代替反引号。

以下

// `j becomes `j

j o v B C H I J K M
N O R T V Z 1 2 3 4
5 7 9 ! @ # $ % ^ &
- _ + | ~ { } ; : '
" , / ?
Space(0x20)

替换

// `a becomes a

a b c d e f g h i k
l m n p q r s t u w
x y z A D E F G L P
Q S U W X Y 6 8 0 *
( ) = \ ` [ ] . < >

仅当我在编辑 TeX文件并处于插入模式时才会出现此行为。 在正常模式下,我会跳到标记位置,在Markdown上,我的Vim会显示一定数量的反引号。

为什么它以这种方式工作,我该怎么做让它以某种方式工作?

  • macOS Sierra 10.12.3
  • Vim 8.0.57

我的vimrc:

if 0 | endif

if has('vim_starting')
    if &compatible
        set nocompatible
    endif

    set runtimepath+=~/.vim/bundle/neobundle.vim/
endif

call neobundle#begin(expand('~/.vim/bundle/'))

NeoBundleFetch 'Shougo/neobundle.vim'

NeoBundle 'thinca/vim-quickrun'

NeoBundle 'Shougo/vimproc',{
            \'build' : {
            \  'windows' : 'make -f make_mingw32.mak',
            \  'cygwin' : 'make -f make_cygwin.mak',
            \  'mac' : 'make -f make_mac.mak',
            \  'unix' : 'make -f make_unix.mak',
            \  },
            \ }

NeoBundle 'Shougo/unite.vim'

NeoBundle 'osyo-manga/unite-quickfix'

NeoBundle 'osyo-manga/shabadou.vim'

NeoBundle 'lervag/vimtex'

NeoBundle 'Shougo/neosnippet'

NeoBundle 'Shougo/neocomplete'

NeoBundle 'Shougo/neosnippet-snippets'

NeoBundle 'nelstrom/vim-visual-star-search'

NeoBundle 'tpope/vim-fugitive'

NeoBundle 'vim-ruby/vim-ruby'

NeoBundle 'tpope/vim-endwise'

NeoBundle 'plasticboy/vim-markdown'

NeoBundle 'kannokanno/previm'

NeoBundle 'tyru/open-browser.vim'

NeoBundle 'derekwyatt/vim-scala'

NeoBundle 'scrooloose/nerdtree'

call neobundle#end()

filetype plugin indent on


NeoBundleCheck

syntax on


set spelllang=en,cjk
set spell

set expandtab
set shiftwidth=2
set softtabstop=2
set autoindent
set smartindent

set pumheight=10

set showmatch
set matchtime=1

set wrap

set ignorecase
set smartcase

set scrolloff=3
set ruler
set display=lastline

set cole=0

set backspace=indent,eol,start

au FileType * setl cole=0

nnoremap j gj
nnoremap k gk
nnoremap <Down> gj
nnoremap <Up> gk

nnoremap gj j
nnoremap gk k

nnoremap <silent><C-l> <C-w>l
nnoremap <silent><C-h> <C-w>h
nnoremap <silent><C-k> <C-w>k
nnoremap <silent><C-j> <C-w>j
nnoremap <silent><C-e> :NERDTreeToggle<CR>

nnoremap <Space>h ^
nnoremap <Space>l $

inoremap <C-j> <BS>
cnoremap <C-j> <BS>

imap <C-k>  <Plug>(neosnippet_expand_or_jump)
smap <C-k>  <Plug>(neosnippet_expand_or_jump)
xmap <C-k>  <Plug>(neosnippet_expand_target)

imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
            \ "\<Plug>(neosnippet_expand_or_jump)"
            \: pumvisible() ? "\<C-n>" : "\<TAB>"

smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
            \ "\<Plug>(neosnippet_expand_or_jump)"
            \: "\<TAB>"


let g:tex_conceal = ''

let g:quickrun_config = {
            \ 'split' : '',
            \ 'runner' : 'vimproc',
            \ 'runner/vimproc/updatetime' : 10,
            \ 'tex' : {
            \ 'command' : 'latexmk',
            \ 'cmdopt' : '-pvc -pdfdvi',
            \ 'exec' : ['%c %o %s']
            \ },
            \}

1 个答案:

答案 0 :(得分:0)

检查文件类型,语法,键映射..

:set ft? syn?
:imap
:map

尝试禁用有向图:

:set nodigraph

尝试删除可能在语法配置文件中定义的任何反引号映射:

:iunmap `