Is there any way to take a fileencoding setting (for instance utf8 or cp1252) that you might set and find out what it's valid hex range is?
When a character falls outside the range, it is displayed ...
I just learned about the shortcuts that allow you to manipulate ranges, e.g. :+5,+10co. to copy after the current line.
I wondered if there is a way to copy and move at the start of the current line?
The following search command will make a range and search/replace within it. Specifically, it looks for 'first' in the text, then stops when it finds 'second' across multiple lines. Then, within that ...
By simply calling :(range)g/bob/norm Axxx I can add xxx to the to the end of all lines in range containing bob. Is there a way to return to normal mode after having used A/I/a/i to enter insert mode, ...
Say you have some text like this:
## countries, primary
United States,Washington,North America
## countries, secondary
Is there a way to copy a few times a given block from command-line mode, e.g. with the :t command?
For example, how to copy the two lines (block) above the cursor -2,-1 to the current position ., 3 ...
Imagine I have the following text:
some random stuff
some other random stuff
I want to replace the asterisk bullets with numbers, like so:
some random stuff
In vim, when executing a command with a range specified, the cursor will move to the end of the range. For example, after 10;+4print, cursor will be at line 14 wherever you run this command.
Q1: Is ...
Considerthis text with shopping and todo list
First thing in the morning
- call Bob
- buy carrots
- buy bread
- text Charlie
- buy butter
- email Alice
only then start the day
What I am looking for ...
I have 69 files in which I want to prepend lines 5 to penultimate with a short string. How could I address the penultimate line? :5,61s/^/X/g would do it if I manually look up that the last line is 62,...
I know I can apply changes to multiple lines by selecting the lines in visual mode (I use ctrl-v) and defining the set of actions and the mode to start in (e.g. norma A, will add a comma at the end of ...