Duplicate: http://stackoverflow.com/questions/785389/using-vim-as-a-logfile-viewer/785412
I want to use gvim to view a log file which is being updated continuously, such that I always see the last updated line, much like tail command in unix. Is it possible?
...
I'm looking for the good way to use vimdiff. Currently I figured out how to get a block of diff from a buffer to another (using 'do') but what I'm willing to do now is to simply get one (or some) line of a block in the other buffer.
The vimdiff doc say :
:[range]diffget
but I can't figure how to have a correct range parameter to simp...
I usually get this new window open up suddenly while I am editing a Ruby file in VIM. This is getting irritating because, i cant type in anything while its processing. And it usually happens arbitarily. Does any one here know which plugin could be doing this? Or is this somekind of VIM's process?
...
When debugging some php scripts it would be very handy if I had a shortcut that would insert a piece of text like an echo with the current linenumber and filename.
echo "Hello at filename.php at linenumber";
Even auto inserting some text like a comment with a static echo would be sweet.
/* DEBUG */
echo "in here";
Is this possible in...
scmdiff marks the differences between the checked in version of a file and the file that's being edited. It marks it by coloring the changed lines. Is there any way to view the changes using a vimdiff-style split instead of just coloring the changed lines?
For instance, if abc is a file under version control, then I can use the follow...
Does anyone have any idea how to change the thickness of the text pointer in gVim in insert mode? I'm using it on Windows, so maybe there's a Windows trick that may do the job.
Right now it's about 3px wide, whereas I want it 1px wide.
...
Given the following text in Vim:
[2] [3] [4]
I want to perform a search and replace and produce the following:
[1] [2] [3]
I know how to extract out the numbers using back-reference via search and replace:
:%s/\[\(\d\)\]/[\1]/g
But now the question is how do you go about decrementing the value of \1.
Any ideas?
...
Is there a way to get vim to paste a function's arguments after selecting it via omnifunc (or at least displaying it after selecting it, but not before)? Something like:
myObject.play(int time, std::string foo)
Maybe even allows you to tab through the arguments like what those snippets plugins allow you to do.
Is there such a plugin o...
I used to have 8-space tabs in Vim. Then I changed to 4 spaces, but now whenever I add a line to some code I had written before changing to 4 spaces, it gives me an indentation mismatch error even though everything is lining up nicely. Is there any way to avoid this problem?
...
Basically, I really like vi[m]'s key-bindings, but not the rest of the editor. I really dislike emacs key-bindings, but like the rest of the editor.
viper-mode seems like the best of both worlds, but it's not perfect..
What vim features did you miss in emacs (and more importantly, how did you get them back)? What config-tweaks did you ...
Given the plain text file with lines
bli foo bla
abc
dfg
bli foo bla
hik
lmn
what sed or awk magic transforms it to
bli foo_01 bla
abc
dfg
bli foo_02 bla
hik
lmn
so that every occurence of 'foo' is replaced by 'foo_[occurence number]'.
...
When I start gvim from withing a terminal, I can access my all environment variables.
But if I launch gvim from a menu or from the "Run application" launcher, all my environment variables are not accessible.
How can I access the environment variables defined in my bashrc if gvim is not launched from a terminal ?
These variables are de...
While editing .scm files it would be great if VIM would automatically put the ending brace ")" as soon as I start "(". How do I do this?
...
I'm sitting here feeling silly - the vim help tells me to hit CTRL] (to follow links in the help) and I can't get it!? Same problem with ^Wc (close a split window)
I have a German keyboard and especially the CTRL] doesn't seem to work for me.
How do I do them?
Thanks for the help so far, seems to work except the CTRL]! Any idea how I...
I have the following commands in a README file:
./Setup ...
./Setup ...
./Setup ...
I want to run them by selecting the codes visually and then running them.
I run unsuccessfully
: '<,'> !
Current code after Luc's comments in his answer
My code in .vimrc which I have not managed to get to work:
vmap <silent> <leader>v y:exe '!'....
Is there any way to disable the "Press ENTER or type command to continue" prompt that appears after executing an external command?
EDIT: Found a workaround: Add an extra <CR> to the shortcut in my .lvimrc.
map <F5> :wall!<CR>:!sbcl --load foo.cl<CR><CR>
Any better ideas?
...
Hi,
In my vimrc I've got a generic tab setting of 2 spaces, and I'd like to override that on a per language basic (ie 4 for Python etc, otherwise use the default), but I'm having trouble finding any good example of this.
...
I want open a path to vim from Screen's copy-mode by
Ctrl-A f
similarly as I can open external files in Vim by
Ctrl-W f
How can you open a path in Vim in Screen's copy-mode?
--- Thank you for Samuil to get the crux move
Let's assume mouse is at PATH/file in the following code which represents display when Screen is on
text[s...
I do NOT have python/ruby enabled. My Question: I frequently have to write things like the following:
%macro(200701);x gzip /home/test/200701.txt;run;
%macro(200702);x gzip /home/test/200702.txt;run;
%macro(200703);x gzip /home/test/200703.txt;run;
%macro(200704);x gzip /home/test/200704.txt;run;
%macro(200705);x gzip /home/test/200705....
Given a python file with the following repeated endlessly:
def myFunction(a, b, c):
if a:
print b
elif c:
print 'hello'
I'd like to move around and edit this file using familiar vim movements. For instance, using (, ), [[, ]], {, } or deleting/yanking/changing text using commands like di}.
In other languages ...