# All Questions

9,330 questions
Filter by
Sorted by
Tagged with
4k views

### HTML syntax folding in VIM?

I was wondering which is the best way to use syntax folding for HTML files. Specially if it can recognize javascript code within <script> tags. I typed set foldmethod=syntax but it does not ...
483 views

### How does the “d3fg” command work?

I would like to know how a "d3fg" command works in vi. I have done some research on Google and found that d is delete and fg means foreground. Suppose, if we want to stop the session of vi and resume ...
2k views

### How to translate Unicode escape sequences to the Unicode character?

I have a file with a lot of characters represented like this: \u05E2. (These are the actual characters in the file: backslash, lowercase u, and four hexadecimal digits.) Due to that, the file is ...
3k views

### I can't get 256 colours to work with Vim in iTerm2 on MacOS X

I am having a rough time getting the colors right with my vim setup and the color scheme I want to use. Using: OSX 10.10.2 Vim 7.4 iTerm2 (Set to report terminal type as "xterm-256color") gruvbox ...
53 views

### Transfer file-related settings over to a new, derived file? [closed]

Let's say we handle a file that needs various speciffic settings: We have a file type, syntax, colorscheme, highlights, tab widths and more. Also, we have multiple plugins with Now, we want to ...
6k views

### What does <Bar> mean?

In answering a question just now, I mentioned using a normal mode key mapping that can be found at vim.wikia.com. In the middle of explaining the key mapping, I realized that I had no idea what <...
571 views

### Entering search pattern with syntax highlighting?

A search pattern used with /, entered on the vim command line, can be very complex. But even for a normal regular expression pattern, syntax highlight of the expression syntax would be helpful. ...
25k views

### Show only matching lines?

In a long file, I would like to search for a pattern that will match roughly 200 lines or so. The matched lines are in random places in the file. When a line matches, only the line itself is relevant, ...
2k views

### How to write vertically?

Lets say I want to produce the following text in my document: % % Not Important % O -------------------------> % | % S | % o | % m | % e | % | % M | % s | % g | % | % ...
3k views

### What does :open do in vim?

Vim's documentation has this to say about the :open command: This command is in Vi, but Vim only simulates it: *:o* *:op* *:open* :[range]o[...
175 views

### Are there any platforms whose native vi is not vim, nvi, or original vi? [closed]

Just like in the title. I know most Linux distributions ship with vim and most BSDs use nvi, but I was wondering if there are any "obscure" versions of vi on some commercial UNIX or other platform, ...
607 views

145 views

### inspect filter output in minibuffer or a new buffer

Would like to send a line to an external programme and inspect output in the minibuffer or a new buffer. Don't want the output to replace original text. How to do this? In gnu emacs there's M-| (...
354 views

### Why doesn't nmap <tab> v>` work?

In my vimrc file, nmap <tab> v> doesn't work. But other key binding, such as nmap <s-tab> v< vmap <tab> >gv vmap <s-tab> <gv Do work. I tried to search for <...
4k views

### How to write a fold-expr?

I have read the help page about fold-expr (:h fold-expr) but it didn't explain what's the syntax used in the expression. There were there four examples: :set foldexpr=getline(v:lnum)[0]==\"\\t\&...
676 views

### Why I am losing syntax highlighting when folding code within a <script> tag?

I am working with an HTML file and within a <script> tag specifically. I usually fold my code using the marker method. However an annoying behavior sometimes happens with my syntax highlighting ...
580 views

### Command to create \begin{} \end{} environment in LaTeX

How can I make a command that allows me to insert LaTeX environments in the current text? The idea is to press Ctrl+E or type :texenv and then enter the environment name in the bottom line, e.g. :...
1k views

### Folding by regex search pattern

I got a plain text file with whitespace separated columns of values. Like this: AU 3030 .... ... .... AU 3031 .... ... .... AU 3032 .... ... .... AU 3033 .... ... .... IT 48100 ... .. ..... IT ...
133k views

### Why doesn't the backspace key work in insert mode?

Trying to delete characters in insert mode with the backspace key sometimes doesn't seem to work. I can backspace sometimes, but at other times it does nothing; the cursor doesn't go to the left, and ...
2k views

### Collapse vim folds to a single line, similar to Atom or Sublime Text

I'm a fan of the way that Atom and Sublime Text handle line folding, where the first line of each fold is visible (complete with syntax highlighting), and a marker is appended to the end of the line ...
1k views

### Put a process started with ! in the background

If I do this from the shell: $sleep 100 I can make it go to the background by doing: ^Z$ bg And then continue using my shell. You can get the same effect by adding a & to the end of the ...
6k views

### How do I open a file to view in a new tab?

How do I open a file to view in a new tab? Specifically, I want the read-only equivalent of :tabe[dit] <filename>. I have tried :tab :view <filename> but that does not create a new tab ...
381 views

### Is there a way to write out the results of “:ls” to a file?

I have a bunch of splits up right now, and it took me a while to find these files (basically I'm chasing down a bug through 50 interconnected files). Is there a command like :ls > /tmp/filelist ...
7k views

### How do I navigate to topics in Vim's documentation?

In Vim's built-in help system, how do I… search for topics that I want help on? follow hyperlinks? browse around for related material?