Difference between revisions of "Vim"

From TheBeard Science Project Wiki
Jump to: navigation, search
(Disable Auto-Indent)
(Disable All Auto-Formatting)
 
Line 2: Line 2:
 
== Disable All Auto-Formatting ==
 
== Disable All Auto-Formatting ==
  
Vim has really taken a turn for the worst. It's supposed to be a tool with maximum utility, but instead it automatically inserts garbage, by default, when you don't want it!
+
Vim has really taken a turn for the worst in some distros. It's supposed to be a tool with maximum utility, but instead it automatically inserts garbage, by default, when you don't want it!
 
Why would I want automatic commenting? Is it too much trouble to type a comment? I'll tell you what's too much trouble, when you paste a block of code and it all gets automatically commented, and automatically indented beyond recognition. I spend more time mending the damage done by vim than actually writing code. Is this just the default in Ubuntu Server, or Debian? I don't care. Whoever is responsible for this ... well, here's how to disable EVERYTHING!
 
Why would I want automatic commenting? Is it too much trouble to type a comment? I'll tell you what's too much trouble, when you paste a block of code and it all gets automatically commented, and automatically indented beyond recognition. I spend more time mending the damage done by vim than actually writing code. Is this just the default in Ubuntu Server, or Debian? I don't care. Whoever is responsible for this ... well, here's how to disable EVERYTHING!
  

Latest revision as of 01:15, 13 June 2019

Disable All Auto-Formatting

Vim has really taken a turn for the worst in some distros. It's supposed to be a tool with maximum utility, but instead it automatically inserts garbage, by default, when you don't want it! Why would I want automatic commenting? Is it too much trouble to type a comment? I'll tell you what's too much trouble, when you paste a block of code and it all gets automatically commented, and automatically indented beyond recognition. I spend more time mending the damage done by vim than actually writing code. Is this just the default in Ubuntu Server, or Debian? I don't care. Whoever is responsible for this ... well, here's how to disable EVERYTHING!

(I will continue to add more as I discover it)

Disable auto-indent:

cd /usr/share/vim/vim80
sudo mv indent.vim indent.vim.bak

Disable auto-commenting:

(replace the path to vimrc file with the correct path for your distro)

echo "autocmd BufNewFile,BufRead * setlocal formatoptions-=cro" >> /etc/vim/vimrc