LucHermitte / lh-brackets

LH's bracketing system for vim
Other
51 stars 2 forks source link

I'm getting an error #10

Closed Thermatix closed 7 years ago

Thermatix commented 7 years ago

after having used visual mode to select some text I press shift + 9 to get a left bracket, however I get the following errors in the vim command line:

Error detected while processing function lh#tags#ctags_flavor[3]..<SNR>147_System:
line    4:
E605: Exception not caught: Cannot execute system call (ctags --version): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal opt
ion -- -^@usage: ctags [-BFadtuwvx] [-f tagsfile] file ...^@
Press ENTER or type command to continue
Error detected while processing /Users/Thermatix/.vim/bundle/lh-dev/autoload/lh/dev.vim:
line  100:
E171: Missing :endif
Press ENTER or type command to continue
Error detected while processing function lh#map#surround:
line   43:
E171: Missing :endif
Press ENTER or type command to continue

if it helps I'm working on an empty unsaved file, here's a link to my vim files, the entry point is vimrc.vim

LucHermitte commented 7 years ago

Hum. I have to refactor since surrounding doesn't require ctags.

However, must I understand that your flavour of ctags doesn't support the --version flag?

Thermatix commented 7 years ago

It wasn't just that, installing ctags from brew solved the issue, I'm guessing that the ctags that came with mac doesn't like --version? either way, it's now working, well sort of.

parentheses and braces seem to work but brackets and quote don't.

LucHermitte commented 7 years ago

I suspect your default ctags was an old BSD flavour. If I may, nowadays, I recommend universal ctags which is an actively maintained fork of the venerable exhuberant ctags.

Regarding the brackets and quotes that don't work, are you speaking about the surrounding feature? Have you seen that the default mappings are bound to <leader>[ and to ''. I do that in order to not lose to many native vim features.

Thermatix commented 7 years ago

thanks for your help, using \ and then [ correctly added brackets but for quotes (' or ") I have to do \ + ' and then ' for singles and \+shift+" and then shift + " to surround in quotes.

LucHermitte commented 7 years ago

The '\' isn't required. Just double the quote character you wish to use. '+' for single quotes, and " + " for double quotes.

Thermatix commented 7 years ago

AH i see, I thought that the leader key was needed for quotes as well, but just for brackets and braces.