Finding your way in vim: tags, cscope, grep and more
stolowski.blogspot.com
Finding your way in vim: tags, cscope, grep and more
1–10 of 34 posts
Re: Finding your way in vim: tags, cscope, grep and more
#2At least for Python, Vim's OmniCompletion does a reasonable job of figuring out function names:
http://vimdoc.sourceforge.net/htmldoc/version7.html#new-omni...
Re: Finding your way in vim: tags, cscope, grep and more
#3I made a script that opens all the files I need. I call the script with: :source scriptname.
Only problem is that the script works only if I open vim with 'vim' and not with 'sudo vim' (by the way, why is that?).
But if I open with 'vim', then it give me problem when I try to save...
Re: Finding your way in vim: tags, cscope, grep and more
#4Maybe somebody could help me to figure out how to save files properly with vim. I made a script that opens all the files I need. I call the script with: :source scriptname. Only problem is that the script works only if I open vim with 'vim' and not with 'sudo vim' (by the way, why is that?). But if I open with 'vim', then it give me problem when I try to save...
A useful alias if you need root permissions to save:
cmap w!! w !sudo tee % >/dev/null
Re: Finding your way in vim: tags, cscope, grep and more
#5Re: Finding your way in vim: tags, cscope, grep and more
#6Re: Finding your way in vim: tags, cscope, grep and more
#7I find VIM so difficult to get my head around. Emacs seems to make more sense.. is there any point in trying to grok VIM?
The short answer: if you're happy with your productivity in Emacs, then there's likely no compelling reason for you to switch, unless you enjoy the challenge of learning a new text editor.
Re: Finding your way in vim: tags, cscope, grep and more
#8Maybe somebody could help me to figure out how to save files properly with vim. I made a script that opens all the files I need. I call the script with: :source scriptname. Only problem is that the script works only if I open vim with 'vim' and not with 'sudo vim' (by the way, why is that?). But if I open with 'vim', then it give me problem when I try to save...
Only problem is that the script works only if I open vim with 'vim' and not with 'sudo vim' (by the way, why is that?).
Based on what you've said, I'm not sure if this is an sudo issue or a vim issue. Where is scriptname, and where are the files that scriptname references? Your sudoers may be set up to replace the environment in such a way that vim looks relative to root's home directory rather than your user's home directory. You may need to copy your ~/.vim directory to ~root/.vim, if ~/.vim is where you've put scriptname and the other things it loads. Or you can move these into a system-wide path that vim searches.
Re: Finding your way in vim: tags, cscope, grep and more
#9Maybe somebody could help me to figure out how to save files properly with vim. I made a script that opens all the files I need. I call the script with: :source scriptname. Only problem is that the script works only if I open vim with 'vim' and not with 'sudo vim' (by the way, why is that?). But if I open with 'vim', then it give me problem when I try to save...
Hmm, if the script is just a series of open commands it's weird that you are having issues as root (no errors displayed?). With problems when you save you mean that you don't have the required permissions(e.g. files owned by root or other users)? A useful alias if you need root permissions to save: cmap w!! w !sudo tee % >/dev/null
Re: Finding your way in vim: tags, cscope, grep and more
#10I find VIM so difficult to get my head around. Emacs seems to make more sense.. is there any point in trying to grok VIM?