Skip to main content
Share Your Experience: Take the 2024 Developer Survey
17 votes
Accepted

automatically rewrap lines when writing markdown in VIM

Even simpler: the a flag for 'formatoptions' enables automatic formatting of paragraphs whenever text is inserted or deleted. See :help fo-table for details on 'formatoptions' flags and :help ...
8bittree's user avatar
  • 1,536
12 votes

How can I easily create and maintain tables?

If you don't want to install any plugins and you want to edit tables keeping the alignment: -- use the built in VREPLACE mode, activated by gR. (Make sure you has vim latest version, and check if it's ...
rossijonas's user avatar
7 votes
Accepted

Entering italic text in vim

TLDR: There is no such thing. Vim edits plain text, and there is no "italic mode" or anything like that. To be more specific: Vim is not a word processor. You are confusing file formats and how they ...
Karl Yngve Lervåg's user avatar
6 votes

How can I easily create and maintain tables?

I've created the command-line tool tablign for this purpose; it works from within vim as well. Simply install with [sudo -H] pip3 install tablign mark the table in vim and call :'<,'>:!...
Nico Schlömer's user avatar
5 votes
Accepted

Case-insensitive abbreviations

You could use the abolish plugin. For your example you could use the following: :Abolish perche{'} perché It changes perche' to perché, Perche' to Perché and PERCHE' to PERCHÉ. For the second ...
mMontu's user avatar
  • 6,640
4 votes

Find out duplicate words with differing case

The following script provides the :Ambiguous command. It displays keywords (read :h 'iskeyword') that are the same but have different letter case in the location-list window. The script is explained ...
Tommy A's user avatar
  • 6,780
3 votes

automatically rewrap lines when writing markdown in VIM

For the sake of completeness, I'd like to mention the plugin-based option. If you use something like ALE which supports running your buffers through a beautifier on save, you could let Prettier ...
ssokolow's user avatar
  • 231
3 votes
Accepted

How can I get a reading time estimate?

As far as I know there is no built-in method for this, but I extended g<C-g> using the following function: fun! s:readtime() let l:status = v:statusmsg try exe "silent normal! g\...
Martin Tournoij's user avatar
1 vote
Accepted

How to customize word definition in vim?

The iskeyword setting controls which charters are part of a "word"; you can add the . and - to it (isk being the abbreviated form): :setl isk+=- isk+=. And then b will go back to the "...
Martin Tournoij's user avatar
1 vote

How to have word count exclude bracketed text?

You'll have to write a bit of custom code for this: :echo getline(1, '$')->join(' ')->substitute('\[.\{-}]', ' ', 'g')->split('')->len() getline(1, '$') gets all lines as an array, join(' ...
Martin Tournoij's user avatar
1 vote
Accepted

Vim wordcount for alphanumeric characters only

You can split() on non-word characters and count the number of resulting words. :let cnt=0 | g/./let cnt+=len(split(getline('.'), '\W\+'))
Matt's user avatar
  • 20.8k
1 vote

Dictionary (as in wikitionary) plugin indication

As the vim community did not have such a plugin I have then developed it. It is available at: https://github.com/fmv1992/vim_dictionary Features Works offline (downloads a dictionary during the ...
fmv1992's user avatar
  • 181
1 vote

Dictionary (as in wikitionary) plugin indication

Put your cursor on a word then do... :r http://services.aonaware.com/DictService/DictService.asmx/De‌​fine?word=<cword> | %s/<\_.\{-}>//g | %s/^M//g You'll want to do a little bit more ...
B Layer's user avatar
  • 19.9k
1 vote

automatically rewrap lines when writing markdown in VIM

I would have a look at :help 'textwidth'. It will automatically break lines as you type. However this doesn't work if you're editing the middle of a line. I personally prefer to leave textwidth off ...
Tumbler41's user avatar
  • 7,756

Only top scored, non community-wiki answers of a minimum length are eligible