vimcoder icon indicating copy to clipboard operation
vimcoder copied to clipboard

How to setup vim configurations only for vimcoder?

Open huntzhan opened this issue 9 years ago • 1 comments

The solution is to consider whether or not such settings should actually be global; if they should be global, change setlocal to set in your vimrc file. Alternatively, if you want certain settings to be set only for certain kinds of buffers, you can use the autocmd command to selectively set settings according to file path pattern and various events. See :help autocmd for more information.

First of all, thanks for your amazing vim plugin!

I've installed jiangmiao/auto-pairs for auto-completing braces, but for some reason, maybe the reason you discussed on README, the plugin doesn't work in vimcoder. I want to make a quick fix by writing something as follow:

if run in vimcoder:
  inoremap { {<CR>}<Esc>ko
endif

So, here's the problem. It's there a way to test vimcoder is running?

huntzhan avatar Dec 21 '15 10:12 huntzhan

You can indeed use autocmd to do that:

autocmd BufNewFile,BufRead /path/to/your/vimcoder/* inoremap { {<CR>}<Esc>ko

This runs your Vim command (the inoremap) whenever a new file is created in or an existing file is read from the /path/to/your/vimcoder directory.

Sorry for the late response, but hopefully that helps.

chazmcgarvey avatar Feb 08 '16 05:02 chazmcgarvey