Sometimes I try a customization/command in my vimrc. Everything seens to be correct, but it just doesn't work.
It's difficult to know what's happening when vim starts, and know which command failed or not, so it's really difficult to debug what can be causing a problem in my vimrc. It's a trial-error approach, which is time consuming an...
when i type a line say
Happy new
and then <backspace><backspace> and then retype
the old characters stay around until i type 3 or 4 characters.
This is very disorienting.
...
I'm looking for some tools for testing vim scripts. Either vim scripts that
do unit/functional testing, or
classes for some other library (eg Python's unittest module) that make it convenient to
run vim with parameters that cause it to do some tests on its environment, and
determine from the output whether or not a given test passed....
I recently found that there is a command in Vim called compiler. You can call it with any common compiler (for example, :compiler gcc, :compiler php, etc.), but it doesn't seem to have any immediate effect.
I searched on the manpages but didn't find anything useful about what it actually does, nor does the Vim Wiki. Does anyone know wha...
Is there a way to grab and export the match part only in a pattern search without changing the current file?
For example, from a file containing:
57","0","37","","http://www.thisamericanlife.org/Radio_Episode.aspx?episode=175"
58","0","37","","http://www.thisamericanlife.org/Radio_Episode.aspx?episode=170"
I want to export a new fil...
In the article, Vim Regular Expressions, Oleg Raisky gives the following command to reduce multiple blank lines to a single blank:
:g/^$/,/./-j
Can someone please describe how this works?
I know :g command and regular expressions. But I didn't understand what the part /,/./-j does.
...
I'm interested in setting up a TDD environment for developing Vim scripts and rc files. As a simple example, say I want to have vim insert 8 spaces when I press the tab key. I would set up a script that did the following:
Launch vim using a sandboxed .vimrc file
press i
press tab
press esc
press :w test_out
assert that test_out contain...
I know there are ways to automatically set the width of text in vim using set textwidth (like http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns). What I am looking for is something similar to = (the indent line command) but to wrap to 80. The use case is sometimes you edit text with textwidth and after joining lines...
I use VIM as my text editor and I edit a lot of XML and WSDL files.
WSDL files have an XSD section.
Is there some VIM plugin I can use to traverse the XSD types? i.e., if I have the following line and the caret is where the '|' sign is:
<xsd:element minOccurs="0" name="FooName" type="Magic|FooType"/>
and I press Ctrl+Alt+Foo (or some...
I usually use Vim, and its great for the ability to do faster some actions than other editors. However, since I live in Argentina I have a Latin American keyboard, that makes everything in Vim pretty slower (to write / to search, I must press Shift+7).
Since I don't want to be changing Keyboard layouts all the time (and its pretty diffi...
When pasting from the system buffer in a line like
foo( someVal , <cursor is here>, someVal3);
If I use "*p I get
foo( someVal, , someVal3);
<pasted text>
If I use "*P I get
<pasted text>
foo( someVal, , someVal3);
but I want
foo( someVal, <pasted text>, someVal3 );
How can I get the result I want?
edit
If there is a newl...
Is it possible to use regex to turn this
<site-ui:header title="error" backURL="javascript:history.go(-1);" />
into this
<site-ui:header
backURL="javascript:history.go(-1);"
title="error"
/>
Basically, my goal is to format this xml so that the fields are in alphabetical order (e.g. backURL comes before title), and each field...
I get a CSS file:
div#header h1 {
z-index: 101;
color: #000;
position: relative;
line-height: 24px;
margin-right: 48px;
border-bottom: 1px solid #dedede;
font-size: 18px;
}
div#header h2 {
z-index: 101;
color: #000;
position: relative;
line-height: 24px;
margin-right: 48px;
border-bot...
As this post points out you can install Vimballs using the normal:
vim somevimball.vba
:so %
:q
But if you want to install a from the command line how do you do it? I ran a 'man vim' and it seems like the best "from source install" option was the '-S' option so I tried to install haskellmode with it:
wget 'http://projects.haskell.org...
I get a text file:
<p>...</p>
<pre>
...
...
...
...
</pre>
<p>...</p>
<p>...</p>
<p>...</p>
<pre>
...
...
...
</pre>
<p>...</p>
Notice that: there are some empty lines between [pre]...[/pre].
I want to delete them.
But, I want keep those in [ p]...[/p]
The text file becomes:
<p>...</p>
<pre>
...
...
...
...
</pre>
<p>...</p>
<p>.....
I'm trying to make an accurate Visual Studio scheme.
I set hi function to blood color (#9A1102) for the "CSS function" (e.g. #thisisanid).
But now the brackets with properties (id, class) in html elements also have blood color: (ironically the same color here in Stackoverflow). But I want them blue (#2902FC)
e.g.:
Sample of ...
I have a macro that I use to replace special characters for its html entities. I would like to save it in my .vimrc.
According to this, I should use let @r=' *macro_text_goes_here* '. The problem is that my macro is a series of search and replace, something like this:
:%s:á:\á:Ige
:%s:é:\é:Ige
:%s:í:\í:Ige
So, I'...
I develop websites for corporate clients, so we see the , , etc. chars a whole lot. Sometimes I paste in huge blocks of copy, which might even contain pretty quotes ( ) or other strange characters from word processors.
So, my question is this: Does anyone know of a vim plugin or script that can, in one fell swoop, convert all these char...
I happened across this page full of super useful and rather cryptic vim tips at http://rayninfo.co.uk/vimtips.html. I've tried a few of these and I understand what is happening enough to be able to parse it correctly in my head so that I can possibly recreate it later. One I'm having a hard time getting my head wrapped around though ar...
I try to draw a class diagram using Vim.
I fill the editor window with white-spaces.
Type :match SpellBad /\s/ to highlight all the white-spaces.
Ctrl+Q to select vertical white-spaces.
Shift+I to insert Bar(|) and then Esc
...........................
v+l +... + l to select horizontal white-spaces
But I don't know how to change all s...