I want to paste something I have cut from my desktop into a file open in Vi.
But if I paste the tabs embed on top of each other across the page.
I think it is some sort of visual mode change but can't find the command.
...
Has anyone else found VIM's syntax highlighting of Javascript sub-optimal? I'm finding that sometimes I need to scroll around in order to get the syntax highlighting adjusted, as sometimes it mysteriously drops all highlighting.
Are there any work-arounds or ways to fix this? I'm using vim 7.1.
...
Edit: This question had been tagged "Tolstoy" in appreciation of the quality and length of my writing:) Just reading the first and the last paragraph should be enough:) If you tend to select and move code with the mouse, the stuff in middle could be interesting to you.
This question is about how you use text editors in general. I’m loo...
When a previous Vim session crashed, you are greeted with the "Swap file ... already exists!" for each and every file that was open in the previous session.
Can you make this Vim recovery prompt smarter? (Without switching off recovery!) Specifically, I'm thinking of:
If the swapped version does not contain unsaved changes and the edi...
When running a vim instance in gnu screen hitting shift enter in insert mode adds an 'M' and then a newline, rather than just a newline.
Does anybody know what the problem might be, or where to look? Thanks in advance
Relevant system info:
Ubuntu 8.04.1
Screen version 4.00.03 (FAU) 23-Oct-06
VIM - Vi IMproved 7.1 (2007 M...
I've troubles setting VIM (7.1.xxx) for editing python files.
Identing seems broken (optimal 4 spaces).
I've followed some tutorials I found via google. Still no effect :/
Please help.
...
I'm specifically interested in tools that can be plugged into Vim to allow CScope-style source browsing (1-2 keystroke commands to locate function definitions, callers, global symbols and so on) for languages besides C/C++ such as Java and C# (since Vim and Cscope already integrate very well for browsing C/C++). I'm not interested in IDE...
While CTRL-X works fine in vim under windows, CTRL-A selects all (duh).
Is there a way to increment a number with a keystroke under windows?
...
Hi all,
I am trying to get the "Edit with Vim" my Right click context menu to
work, so that each new file I open opens in a new tab in a single instance
of vim.
Currently, using Regedit I have set
\HKEY-LOCAL-MACHINE\SOFTWARE\Vim\Gvim\path = "C:\Programs\Vim \vim72\gvim.exe" -p --remote-tab-silent "%*"
The registry key is of t...
What are the essential vim commands? What does a new-user need to know to keep themselves from getting into trouble? One command per comment, please.
...
How do I prevent vim from replacing spaces with tabs when autoindent is on?
An example: if I have two tabs and 7 spaces in the beginning of the line, and tabstop=3, and I press Enter, the next line has four tabs and 1 space in the beginning, but I don't want that...
...
In order to know how many times a pattern exists in current buffer, I do:
:%s/pattern-here/pattern-here/g
It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status.
Is there a more elegant way to count?
...
I'm trying
:%s/,/\n/g
but it inserts what looks like a ^@ instead of an actual newline, the file is not on DOS mode or anything.
What should I do?
EDIT: If you are curious, like me, check this other question as well.
...
From this question. You have to use \r when replacing text for a newline, like this
:%s/%/\r/g
But when replacing end of lines and newlines for a character, you can do it like:
:%s/\n/%/g
What section of the manual documents these behaviors, and what's the reasoning behind them?
...
How do I duplicate a whole line in Vim in a similiar way to CTRL+D in IntelliJ IDEA/Resharper or Ctrl Alt Arrow in Eclipse?
...
A good while ago, I read an article by the creator of viemu, clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has a great set of graphical cheat sheets that teach the basics a few bits at a time.
I'm convinced.
I've b...
I recently installed vim-enhanced , but I can't find any article/tutorial related to it.All I could find is a page that briefly describes it's new features , along with several RPM's to download .
What exactly does it have to offer to scripting languages that regular vi/vim can't ?
Thanks
...
or "How do I answer questions on SO in Firefox using gVim inside the textboxes?"
...
I am interested in what people use as their text editor, and would specifically like to know what is the feature of vim that you like the most?
In answering, please state what you mostly use vim to do, sysadmin tasks, programming, and in what language you mostly program in.
...
One of the best tips for using vim that I have learned so far has been that one can press <C-C> (i.e. CTRL+C) or <C-[> (ie. CTRL+[) instead of the ESC(ape) key. However I use a dvorak keyboard so <C-[> is a little out of reach for me as well so I mostly use <C-C>. Now I've read somewhere that these two key combinations don't actually hav...