Hot answers tagged

1 vote
Accepted

Why can't I edit the sudoers.d files with vim but I can with nano

Even if you are editing a file as root/superuser, if the write bit is not set for the file Vim will go into readonly mode, but you can still make changes (with a warning from Vim the first time you ...
  • 19.1k
1 vote
Accepted

Pattern not found message on found and highlighted pattern

You need to use % symbol at the start of the regex if the whole document should be searched, rather than just the current line. So execute '%s/function ' . getreg('a') . '/function __construct/' ...
1 vote
Accepted

How can I make MacVim as "Application" on Mac;

Download and install Platypus https://github.com/sveinbjornt/Platypus#install In Platypus create a script for you application and select an icon. I needed to fix the path to find brew installed ...
1 vote

Vim: use tab key for autocompletion with Autocomplpop plugin

the below function did the job set wildmode=list:longest,list:full function! InsertTabWrapper() let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\<tab&...
  • 11
1 vote

Why does git difftool not work with vimdiff?

I know its a bit old question. But I just had the same situation where I set git config diff.tool vimdiff and git diff doesn't open vimdiff. But I am guessing there will others with same question ...
  • 111

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