Closed remko closed 9 years ago
Hi, thanks for reporting.
This is intended behavior. There isn't much reason to delete a single bracket, but if you do it on accident you can either:
u
<C-V>)
Using the element and compound-form text objects liberally helps to avoid this situation.
HTH
I'm closing this issue, but feel free to re-open if you'd like to discuss it further!
Thanks.
Unfortunately, this behavior makes the plugin basically unusable for me, so I had to uninstall it. Personally, I expect my editor to follow standard behavior, i.e. i'm allowed to delete single characters like i always do, and inserting a character in edit mode effectively inserts a character.
I understand that if you rigorously follow the rules to use the sexp-specific commands to insert/delete structures, this is not a problem. However, sometimes it's easy to just do what you usually do, and this is very painful with this plugin.
Personally, I expect my editor to follow standard behavior, i.e. i'm allowed to delete single characters like i always do, and inserting a character in edit mode effectively inserts a character.
You can delete any single character as you like (unlike some other
S-expression plugins), and you can insert any single character with the
<C-V>
prefix.
Forced bracket insertion with <C-V>)
isn't difficult IMHO, but I respect your
preferences, which is why you can disable the insert mode mappings with:
let g:sexp_enable_insert_mode_mappings = 0
If you like vim-sexp's text objects, but don't like the normal mode commands
or the insert mode commands, you can bind the text object <Plug>
mappings
manually:
https://github.com/guns/vim-sexp/blob/master/doc/vim-sexp.txt#L477-L579
(the xmap and omap mappings would bind the text objects to your buffer)
Finally, if you don't like the text-objects, the normal mode commands, or the insert mode commands, then I think you should stop trusting whoever recommended vim-sexp to you. :)
Thanks, I will definitely try the insert mode mapping disabling. This should at least be less drastic than disabling the plugin entirely.
I have a very annoying problem with the closing parenthesis magic from vim-sexp. I have the following
.clj
file:I do the following after opening the file:
o
to insert a line before theprintln
(bla
ESC
to exit edit modelx
to delete the closing bracea
to enter append modeNo matter what I do, i can't seem to close the opening brace anymore, it always jumps to the last line.
I use MacVim 7.4, no other plugins installed (except pathogen).