Skip to content

Instantly share code, notes, and snippets.

@miyakogi
Last active August 29, 2015 14:08
Show Gist options
  • Save miyakogi/ff72c246ec74300ef059 to your computer and use it in GitHub Desktop.
Save miyakogi/ff72c246ec74300ef059 to your computer and use it in GitHub Desktop.
Vim neosnippet と vim-watchdogs の組み合わせでバグ? ー 全てがgになる ー
scriptencoding utf-8
set nocompatible
set runtimepath+=~/.vim/bundle/neosnippet
set runtimepath+=~/.vim/bundle/neosnippet-snippets
set runtimepath+=~/.vim/bundle/vimproc
set runtimepath+=~/.vim/bundle/vim-quickrun
set runtimepath+=~/.vim/bundle/vim-watchdogs
imap <C-J> <Plug>(neosnippet_expand_or_jump)
smap <C-J> <Plug>(neosnippet_expand_or_jump)
autocmd InsertLeave * WatchdogsRun
filetype plugin indent on
set filetype=javascript
insert
function
.
" このgistをダウンロードして vim -N -u temp.vim で起動
" 起動後に A<C-J> でスニペットを展開すると動作がおかしい
" 入力箇所が g になり、ノーマルモードになってしまう
" 再度インサートモードに入って<C-J>しても、次の入力箇所がgになりノーマルモードに戻ってしまう
" jshintが実行可能な必要があります
" 他のfiletype+チェッカーの組み合わせでも発生します(例:python + flake8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment