0
私のチートシートのカスタムファイルフォーマット.cheat
が作成されました。このフォーマットでは、どのコマンドをトリガするのかを簡単に確認できるように、行を交互にハイライト表示しています。私のftpluginの書式設定がすべての形式のすべてのファイルに適用されるのはなぜですか? ~/.vim/vimrc
から私のftpluginのフォーマットは、どのようなフォーマットのすべてのファイルに適用されますか?
キー行:
set nocompatible
au BufNewFile,BufRead *.cheat set filetype=cheat
filetype off
" vundle stuff
filetype on
nmap <leader>? :75vsp ~/.vim/my.cheat
(参考のため以下フルvimrc
。)
フル~/.vim/ftdetect/cheat.vim
:
if exists("b:did_load_filetypes") | finish | endif
let b:did_ftplugin = 1
au BufNewFile,BufRead *.cheat set filetype=cheat
syn match Oddlines "^.*$" contains=ALL nextgroup=Evenlines skipnl
syn match Evenlines "^.*$" contains=ALL nextgroup=Oddlines skipnl
hi Oddlines ctermbg=DarkGray ctermfg=White
hi Evenlines ctermbg=LightGray ctermfg=White
フル~/.vim/vimrc
:
set nocompatible
au BufNewFile,BufRead *.cheat set filetype=cheat
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'dracula/vim'
Plugin 'vim-airline/vim-airline'
Plugin 'tpope/vim-commentary'
Plugin 'neilagabriel/vim-geeknote'
Plugin 'tpope/vim-fugitive'
Plugin 'moll/vim-node'
Plugin 'danro/rename.vim'
Plugin 'vim-syntastic/syntastic'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_check_on_open=1
let g:syntastic_check_on_wq=0
call vundle#end()
filetype plugin indent on
set number
set wrap
set breakindent
set autoindent
set shiftwidth=2
set linebreak
set nolist
set cursorline
set cursorcolumn
set ruler
set laststatus=2
set timeoutlen=1000 ttimeoutlen=0
set splitright
hi CursorLine cterm=NONE ctermbg=Black ctermfg=None
hi CursorColumn cterm=NONE ctermbg=Black ctermfg=None
set updatetime=200
au CursorHold * silent! update
nmap <CR> o<Esc>
nmap <leader>? :75vsp ~/.vim/my.cheat
おかげDhruva、そして感謝:あなたは
ftplugin/cheat.vim
に配置する必要があり、残りの構成ながら- この電車からのパティ・ネット接続;-) - 今すぐ実装してから大きなダニを与えましょう!ありがとう –