I am trying to search a text file for a certain pattern. If this pattern occurs then it means that the rest of the line is not needed and therefore can be deleted.
I have tried using the following commands, but so far have been unsuccessful.
:%s/{pattern}/d$
:g/{pattern}/d$
If anyone has any suggestions they would be greatly appreci...
I close a tab in vim and immediately realize I need to re-open it again for something. Is there a way to undo close tab in Vim 7.2?
...
I want to open a file in vim like in Eclipse using "Ctrl + Shift + R", I type the file name and I get the options of all the files matching that name.
I know opening it normally like:
tabe: <filepath>
new: <filepath>
edit: <filepath>
The problem here is that I have to specify the whole file path in these cases.
Thanks in advance.
...
I would like to have a figures right in my MacVim, similarly as in xEmacs' AucTex.
...
Recently I decided to encrypt my engineering log using vim's :X
encryption feature. I wrote down the password, but evidently I
misspelled something or messed something up because decrypting the file just gives
gibberish. To make matters worse, all my backups are somehow
corrupted (don't ask, I am not sure how either).
I am not going...
I was wondering if there is a way to get vim to read .gitignore files and use them to determine options not to present when auto-completing filenames.
For example, working in python, I'd like to not see .pyc files offered for editing. I think vim has its own mechanism for this, I was wondering how to load information from .gitignore in...
Can VIM be used for XAML editing?
...
Are there any rich-text editors that have Vi(m) keybindings? Specifically, something like Word where I can compose a document with colors, headings, et al. but use Vi(m) bindings to move around and compose?
...
In Vim the * key in normal mode searches for the word under the cursor. In GNU Emacs the closest native equivalent would be:
C-s C-w
But that isn't quite the same. It opens up the incremental search mini buffer and copies from the cursor in the current buffer to the end of the word. In Vim you'd search for the whole word, even if you ...
First of all, I love vim. I have been using vim for a few years now and it has changed my perceptions of what an editor is capable of. I also love modes.
However I am thinking of switching and here is why:
I really like Xcode and it has emacs bindings. I use Mac OS X and it has emacs functionality in all text input fields. I hate using...
After I commit a file to Perforce, it becomes read-only.
If I have this file open in vim, I've just lost my undo-redo history, without even being asked.
How do I make this not happen?
...
I tried the code unsuccessfully
:%s/\n/*\n/g
...
I know how to set the initial window size in gVim, but how do I get it to automatically restore the window dimensions from last session? Is this even possible?
...
As a programmer I spend a lot of hours at the keyboard and I've been doing it for the last 12 years more or less. If there's something I've never gotten used to during all this time is these annoying and almost unconscious constant micro-interruptions I experience while coding, due to some of the most common code editing tasks. Things li...
Hi,
Has anyone managed to get Vim integrated into Eclipse painlessly? I just want to use Vim for the editor while retaining the general Eclipse interface. I have tried using Eclim plugin but the editor seemed to crash more often than work (the site said that the editor replacement functionality is still beta).
On the flip side, is ther...
Hi,
Is there any way to make VIM put the brackets in the right indentation? For example, whenever I type:
if (something)
do something
and then I hit enter after "do something", to have it jump back in line with the if statement? Also, when I go into insert mode, can I make it so it automatically jumps to the correct indentation ...
I am trying to read a lot of c/perl code through vim which contain many single letter variable names.
It would be nice to have some command which could help me change the name of a variable to something more meaningful while I'm in the process of reading the code so that I could read the rest of it faster.
Is there some command in vim...
My previous question seems to be a bit ambiguous, I will rephrase it:
I have a file like this:
copythis abc
replacethis1 xyz
qwerty replacethis2
hasfshd replacethis3 fslfs
And so on...
NOTE: replacethis1, replacethis2, replacethis3, ... could be any words
How do I replace "replacethis1","replacethis2","replacethis3",.. word by "copy...
Is it possible for the terminal to detect < Shift-Enter > or < Control-Enter > keypresses?
I am trying to configure vim to do key mappings that use these sequences, and while they work fine in gvim, they don't seem to work in any terminal console.
The curious thing is that although < C-Enter > is not detected in vim, mapping < Enter > ...
I do a lot of Python quick simulation stuff and I'm constantly saving (:w) and then running (:!!). I'm wondering, is there a way to combine these actions. Maybe a "save and run" command.
Thanks for your help.
...