Since I the vim I used does not contain cscope feature , I need to rebuild vim from source code to be able to use cscope . After a little bit google, I didn't not find a "exactly how to answer" ,so turn to stack** for help .
...
Synopsis:
When calling vim's make command, it changes the current working directory (cwd) to the directory of the current file. It then runs the makeprg from there. I want to prevent the make command from changing the cwd, and instead call the makeprg from the directory of the parent vim instance
Example:
I have the following standa...
Everytime after load a cscope.out in vim , I need to change vim's "pwd" to the same directory as cscope.out file is under ,which might due to that cscope use relative path when generating tag file . So if there is a way to force cscope to use absolute path in its tag file - cscope.out, then it will be regardless of whether the pwd of you...
Vim won't convert fileformat if it sees inconsistent line endings. How can I find those ?
...
Hi,
I'm mostly developing C++ applications with g++ on solaris 10, x64 boxes. These applications are built and deployed with symbols, but without sources on the remote site. When debugging you can then set breakpoints and inspect variables, but you have to "manually" map the reported line numbers to an editor (usually vim/gvim) where yo...
A common programming task for me in vim is:
:s/some pattern/
do some work
n # finds the next entry
do some work
n # finds the next entry
...
Now, s/.... only searches in the current file.
Is there a way I can do this, but search across a directory of files? Say do "s/..../" over all files in subdirectoires of pwd that ends in *.hpp of...
I want to write a function myFunc such that:
myFunc /function foo/
becomes
:vimgrep /function foo/ **/*.cpp **/*.hpp
and
myFunc /class bar: public/
becomes
vimgrep /class bar: public/ **/*.cpp **/*.hpp
how do I do this?
Thanks!
...
is there a way to use the a.vim plugin to switch between .h, .cxx and .txx files? Alternatively, can you provide another solution? The idea is to automagically switch from .h -> .txx -> .cxx at the press of a key.
A Big Thanks to both of you!
...
Find and replace scope can be limited like this:
:16,256s/search_term/replacement/gc
I don't want to replace my search term with any other text, I just want to find them. I tried the following, but it didn't help:
:16,256/search_term # Notice that there is no 's' here
Thanks for your time!
...
Finding vim plugin maintenance and configuring is too laborious and relies on external configurations (such as ruby) tricky. What I want is an IDE like Eclipse, Visual Studio, that I can use vim in. I still want to be able to use different modes (command, visual, insert), but I don't want these inbuilt commands to conflict with the IDE'...
H have some (log4j generated) logfiles to go through; I know their format pretty well (I mean I have already got off-the-peg regexes etc I can use).
I want to automatically highlight them in VIM when I load them up (*.log).
A logfile entry looks something like this:
YYYY-MM-DD HH:MM:ss,SSS [...] #LOG-LEVEL# [...] Message
Where #LOG-...
I use gvim on windows and I want to know a way to disable the temp file(ending in ~) file creation. Also is there a problem if we do it ?
...
I'm using vim with php omnicompletion on in a large project. I have a ctags file and using:
au FileType python set omnifunc=pythoncomplete#Complete
au FileType php set omnifunc=phpcomplete#CompletePHP
au FileType javascript set omnifunc=javascriptcomplete#CompleteJS
au FileType html set omnifunc=htmlcomplete#CompleteTags
au FileType css...
I fire up Gnu screen and start editing a Ruby file with syntax coloring on and choose a vim colorscheme that uses boldface and a colored background (e.g. evening). Then I quit vim. The terminal doesn't return to the way it was before, but takes on some of the properties of the colorscheme I was using in Vim.
This doesn't happen if I'm u...
This is a follow-up from:
http://stackoverflow.com/questions/2193157/vim-simple-steps-to-create-syntax-highlight-file-for-logfiles
I am trying to use the 'region-match' facility to syntax-highlight stack-traces in some logfiles: these logfiles (log4j-based) look a bit like this:
YYYY-MM-DD HH:MM:ss,SSSS...INFO...Message
YYYY-MM-DD HH:...
Is there an easy way to save a commonly used Regex pattern so that I can reuse it between different files? I look through many log files and always need create a mildly complex regex (it's not rocket science but it is a pain to retype) to find errors so it would be good to have a way to recall that without having to save it in a text fil...
Hi.
I'm looking for a command line tool (or Perl module or VIM script or whatever) that will take some input files (such as XML or JavaScript files) and format them in HTML. I specifically want my output not to contain stuff like <span style="color: red"> or <font color=red> according to a particular colour scheme, rather it should use...
It's really annoying to have it shift everything I'm doing down. I'd rather it pop up from the bottom. I've googled around a bit and haven't found a way to do this, or a plugin that would help.
...
I'd like to create a vim function/command to insert an XSD style timestamp. Currently, I use the following in my vimrc file:
nmap <F5> a<C-R>=strftime("%Y-%m-%dT%H:%M:%S-07:00")<CR><Esc>
I'd like to use the Perl code:
use DateTime;
use DateTime::Format::XSD;
print DateTime->now(formatter => 'DateTime::Format::XSD', time_zone => 'Amer...
Regex Question: how do I replace a single space with a newline in VI.
...