Quantcast

vim 7.3 problem with C and #ifdef

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

vim 7.3 problem with C and #ifdef

Gabriel
I tried compiling vim 7.3 from source because I am curious to try the clang_complete plugin (https://github.com/Rip-Rip/clang_complete)

However, even before I installed the plugin I noticed a problem.  If I have a .c file with #if or #ifdef, I cannot use the backspace key to change that line. For example I noticed this problem with a code segment like:

#if 0
foo();
#else
bar();
#endif

I wanted to change the #if 0 to #if 1.  In the normal vim installed on my Ubuntu 10.04 system it worked correctly if I was in insert mode and tried to use the backspace key to erase 0 and type 1.  But with my version of vim 7.3 this did not work.  I did compile 7.3 with --enable-pythoninterp and with --with-features=big. Any ideas on why this is happening and how to solve the problem would be appreciated.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: vim 7.3 problem with C and #ifdef

Gabriel
Actually I realized it is just a problem with my backspace key and it seems that setting backspace=2 as described here fixes the problem:

http://vim.wikia.com/wiki/Backspace_and_delete_problems
Loading...