This question already has answers here:
Customising word separators in vi
(6 answers)
Closed 7 years ago.
How can I customize word definition in Vim? The default is a series of character like _,[a-zA-Z] are considered as word. I'd like to add some other chars to this definition.
You can redefine the iskeyword setting.
Read the VIM docs for it or see this woss article for an example.
Related
This question already has answers here:
How to replace text between quotes in vi
(6 answers)
Closed 5 years ago.
I have documents that are full of double-quoted sentences. And using editors, It seems likely comfortable when 'erase strings surrounded by double(or single) quotes and go insert-mode' function embedded. Is there any way to do it using with vim?
Change inside quotes, ci" (or ci' for single-quoted strings)
This question already has an answer here:
Navigate through camel case
(1 answer)
Closed 5 years ago.
Actually, the title says it all.
How can I get my text cursor to navigate through the start and the end of each word in a specific line of text?
Just tap ALT+> or <. Arrow key: right or left.
This question already has answers here:
gvim What do the # symbols mean at the bottom left of the screen?
(2 answers)
Closed 7 years ago.
I am having problem while scrolling and reading a large file through vi or gvimeditor. In the middle of a file, I am seeing a continuous stream of symbols ^# in blue, like we see often in binary files. However, I don't see them with other editors (e.g. TexEdit in my OS X).
Is it a common problem and is there a way to get rid of this?
add this line to your .vimrc file:
set display=lastline
to understand what it does, do a :h 'display'
This question already has answers here:
Is there a decent Vim regexp OR command? What is the best way to find mismatched if else's?
(3 answers)
Closed 8 years ago.
Question is:
To display only lines contains keyword1 or keyword2,how to do that?
I know there's command like :g/pattern but that can work only for one keyword.
It's not duplicate question as it is to search instead of search replace case
Use alternation:
:g/foo\|bar\|baz/#
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Writing a vim function to insert a block of static text
How can i add multi line abbreviations in vi editor ?
I am using vi from ssh terminal.
if i type "head " the vi should replace "head" with 2 line sentence in the format
as shown below
MAINTENANCE HISTORY
DATE AUTHOR AND DETAILS
Thanks.
With vim you can do:
:iab head MAINTENANCE HISTORY<CR>DATE AUTHOR AND DETAILS
(Or use imap/inoremap instead of iab if you don't want to have to insert whitespace/punctuation before it activates)
No clue if this is possible in vi.