Hi,
Does there exist a register, option... to get the last word deleted (dw)?
Suppose that I have this line:
word_1, word_2, word_3
I place the cursor on w of word_2 and dw and I get:
word_1, , word_3
So I press xx to delete the , followed by a space.
I can't use p or P to paste word_2 because it contains a space.
I know that I...
In vim
:g/George Bush/d
deletes all lines with George Bush.
What if I wanted to delete 5 lines below that start with George Bush?
Another realistic example would be to find all DEBUG in a log4net log and delete up to the end of stack trace (which I know will be another 10 lines below it)
...
Full source here: http://www.vim.org/scripts/download_script.php?src_id=10391
The line is:
silent %s/[^λ←→≲≳≡≠⇒»∙∀\\\-!#$%&*+/<=>?@\^|~.]\@<=\\\([^λ←→≲≳≡≠⇒»∙∀\\\-!#$%&*+/<=>\?@\^|~.]\)/λ\1/eg
Someone please decipher this for me. The larger script is intended to unicode-ify some operators in Haskell into more familiar mathematical...
Is there a command to determine length of a longest line in vim? And to append that length at the beginning of the file?
...
If you're typing a command in Vim (I mean you've started with : and you're working in the bar at the bottom of the screen) is there a way to move the cursor around other than tapping the arrow keys? In particular, can you move it to the beginning, end, back n characters, or back one word?
...
I use VIM for code development and lot of things. I see that there are lot of scripts, configurations shared at vim.org/scripts, also some at github. Time to time I would like to check which one of the scripts used by me were improved. This would need either manual checking of the scripts, but I am too lazy to do that. Writing some code ...
Hello, when I'm using DiffOrig command from vimrc_example, after i close the diff screens, my file is altered with some white line on the left side. How can i remove that without reopening the file?
...
Is there a simple way of finding out the current value of a specified Vim setting? If I want to know the current value of, say tabstop, I can run:
:set tabstop
without passing an argument, and Vim will tell me the current value. This is fine for many settings, but it is no good for those that are either true or false. For example, if ...
I'm trying to use pydiction to autocomplete Python/Django statements in VIM Editor.
When I try to add django modules to complete-dic using this:
python pydiction.py /usr/lib/pymodules/python2.6/django
or:
python pydiction.py /usr/lib/pymodules/python2.6/django/__init__.py
I receive this error:
Couldn't import: (...). Import by fi...
When I start with a blank .vimrc in ~, and add imap jj <esc> to it, everything works fine at first (i.e. typing jj exits from insert mode -> normal mode). But as I add more to my .vimrc, eventually typing jj will skip the cursor ahead some seemingly random, short distance (a couple of words or a couple of lines) in addition to entering n...
In Vim, if I have code such as (in Ruby):
anArray << [anElement]
and my cursor is on the first '[', I can hop to ']' with the "%" key, and I can delete all the content between the '[]' pair with "d%", but what if I just want to delete the '[' and ']' leaving all the remaining content between the two. In other words, what's the quicke...
I've searched around for an hour, both on Stack Overflow and elsewhere. Alas! Please help. Vim's omnicompletion just doesn't work.
I have Vim 7.2 compiled with Python support.
filetype plugin on is in my .vimrc.
When a .py file is open, :echo &omnifunc prints pythoncomplete#Complete.
I'm working with a large project and I have a tags f...
Hi! I am working in a Vim script. One of my functions needs a temporal display like the one you get when typing ":clist". I don't want a whole new buffer since I am so lazy that I prefer typing just one key to delete the info.
I am stuck with the syntax highlighting of the echo command. I want to apply a whole syntax file but so far I'v...
let's say currently there are two buffers in my vim session, and I want to close the current buffer which is under edit in order to switch the other buffer and edit it . using
:q
will quit the whole vim rather than a buffer . so my question is are there any commands can close the current buffer under editing and automatically switc...
If the cursor is in somewhere within a very long function, is there a way to let Vim tell the user in which function he/she is editing?
By the way, I use taglist but seems that taglist does not auto update where you are even if you have moved the cursor to a different function.
...
I have a file that was converted from EBCDIC to ASCII. Where there used to be new lines there are now characters that show up as <85> (a symbol representing a single character, not the four characters it appears to be) and the whole file is on one line. I want to search for them and replace them all with new lines again, but I don't know...
for instance, say I create an object.
$myobject = new MyClass;
when I type $myobject->[I'd like a menu to pop up here with available functions]
...
I found that when multiple tags exist for a given symbol, Vim can't select the right tag .
I don't know whether it's always the truth , but at least I met this problem for several times.
To put my problem more clear, let's say there are two classes : class A and class B in two different cpp files. Both of them defined a public member fu...
Besides ctags / cscope,
what are good vim plugins for navigating C++ code base?
Ideally, when my cursor is on a variable name, I would like to be able to know:
what is the class of this variable,
what functions can I call on this varaible,
jump to the class of this varaible ...
and do this across multiple namespaces.
What tools do yo...
Hi,
I have used Vim extensively on linux console, I am used to it's keyboard shortcuts, like Ctrl+V for vertical selection, and many others.
I have installed gVim for Windows on my computer at work, and I almost can't use it, as many of keyboard commands were redefined. The Ctrl+V pastes the text from clipboard instead of starting vert...