I want to replace a selection of text with is present in the default paste buffer. Say, I yanked a word with yaw and now I want to replace a word with that, how do I do it?
I saw similar questions answered with suggestions to use a named register and delete the text-to-be-replaced into the black hole etc, but I am looking for a cleaner ...
Hello, I have a little Vim script which does a multi-line search and replace:
vim -c 's/^ *<hi a=\"26\">\nHello/<td height=\"26\">\r<\/table>\r<bla \/>' \
-c 'w!' -c 'q' test.html
That works. However, when I put that in a find -exec to do this recursively in the directory:
find . -iname 'test.html' -exec \
vim -c 's/^ *<hi a=...
I know I did not word the question right but I was not sure how. So here it goes.
when using vim the way my color syntax is now, when i type in $ it shows yellow and when i write text it comes in white. How can I configure my vimrc to know when I am writing a php variable ($variable) and keep the color consistent between the $ and the ...
I usually work fullscreen with Vim and Emacs on a 30" monitor which means I tend to have a lot of splits. The active pane's modeline changes background in Vim and Emacs, but sometimes that's not an easy to see indicator of the active pane.
Is there a way to change the background color of the active pane so I can easily, at a glance, se...
Is it possible to have different set of colors for folds and subfolds, eg :
blue fg on grey bg for fold level 1 (default)
black fg on darkyellow bg for fold level 2
etc... (although going further down would seem a bit excessive)
Thanks
ThG
...
how do i preserve sentences that start with X criteria and delete sentences that match Y criteria.
using vim, I would like to delete all sentences that do not start with void.
void set_first_name(string in_first_name);
string first_name();
void set_last_name(string in_last_name);
string last_name();
void set_composer_yob(in...
When omni-completion (or other things) opens the preview window, the size of the main window is reduced in order to make room for the preview window.
By default, the first line that was visible in the main window before the preview window pops up will also be the same after the preview window pops up. This has the unfortunate effect tha...
In the current buffer I have a list of file paths (one per line). I want set "args" to that file list.
How can I do this?
Thanks.
...
I want to map Ctrl-M to Ctrl-N in insert mode. If I simply do imap <C-M> <C-N> then Ctrl-M does start to behave just like Ctrl-N, but then hitting Enter does the same as well. I want pressing Return to keep inserting new lines, and at the same time make Ctrl-M insert the next keyword completion match just like Ctrl-N does. Is that possib...
I am editing a large text array in vim, and I want to compute on one sub-column of it.
Simplified example of edited file:
name value name saturation
red 5 green 2
blue 7 yellow 7
other text
I want to pipe column 4 through an external program calc.pl,
calc.pl replaces numbers with new numbers in the input, for example:
...
In vim, vip selects "inner paragraph" :help v_ip,
however it is of limited use.
vim paragraph boundary is hard coded, a
paragraph is separated by 2 or more blank lines.
:help paragraph
Some archaic marcos like .IP, also seem to be supported as
paragraph separators, but it is all hard coded.
I want to specify my own paragraph separa...
Hi,
I am using "United States-International" on Windows 7, which courses problems in combination with gVim 7.3.
In the US-International keyboard layout the keys " and ' are dead keys, that means, you can combine them with another key. For example pressing "+a results in ä and the keys '+a in á. In order to insert one double quote you s...
Basically I want to move everything from ~/.vim into a separate folder, let's say ~/vim_config.
I added this setup my ~/.gvimrc
set runtimepath^=~/vim_config
If I do a :set rtp the ~/vim_config folder is at the top of the list.
But no plugins are loaded.
Colorschemes are loaded though.
...
my autoindent is not working, any diagnostic tests to figure it out?
my ":set" is:
:set
--- Options --- cindent laststatus=2 scroll=17
tabstop=4 window=36
filetype=cpp number
smartindent ttyfast
helplang=en paste
syntax=cpp ttymouse=xterm2
backspace=indent,...
When dealing with .vimrc configuration files in Linux and Windows (two systems I've been using so far) and trying to keep configurations cross-platform, I've found mainly two solutions:
Create a new folder for vim files in /home/user, so both systems have the same vim dirname (instead of default .vim in linux and vimfiles in Windows), ...
For some reason, in vim whenever there is a line of ruby code with a function including parentheses, eg: string = gets() without a semicolon the next line is indented a level. When there is a semicolon, it works fine. Any ideas as to why this is happening and how to fix it? Also, since it will probably be requested, here is my ~/.vimrc
...
i was wondering how to turn a paragraph, into bullet sentences in vim.
before:
sentence1. sentence2. sentence3. sentence4. sentence5. sentence6.
sentence7.
after:
sentence1.
sentence2.
sentence3
sentence4.
sentence5.
...
In vi/vim is there any way to make Visual Block Mode unconstrained by line endings?
...
In some files I can see a commented line, usually the last, with vim settings. Does vim read these settings? If it does, are any limitations of what kind of settings man can put there?
...
Because the apple store couldn't help me, and indeed had never seen VIM before, despite the fact it comes installed as standard on OSX ;-).
...