Difference between revisions of "Vim"
(Created page with " == Disable Auto-Indent == <source> cd /usr/share/vim/vim80 sudo mv indent.vim indent.vim.bak </source>") |
(→Disable Auto-Indent) |
||
| Line 1: | Line 1: | ||
| − | == Disable Auto- | + | == 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! | ||
| + | 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) | ||
| + | |||
| + | <b>Disable auto-indent:</b> | ||
<source> | <source> | ||
cd /usr/share/vim/vim80 | cd /usr/share/vim/vim80 | ||
sudo mv indent.vim indent.vim.bak | sudo mv indent.vim indent.vim.bak | ||
| + | </source> | ||
| + | |||
| + | <b>Disable auto-commenting:</b> | ||
| + | |||
| + | (replace the path to vimrc file with the correct path for your distro) | ||
| + | <source> | ||
| + | echo "autocmd BufNewFile,BufRead * setlocal formatoptions-=cro" >> /etc/vim/vimrc | ||
</source> | </source> | ||
Revision as of 16:41, 5 March 2019
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! 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.bakDisable 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