add the old snippet md files
This commit is contained in:
parent
fc0dd204c7
commit
bcf8313a4b
110 changed files with 3048 additions and 0 deletions
24
old_snippets/prevent-vim-auto-new-line.en.md
Normal file
24
old_snippets/prevent-vim-auto-new-line.en.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: "prevent vim auto new lines"
|
||||
date: 2020-08-13T10:06:37+02:00
|
||||
draft: false
|
||||
snippet_types:
|
||||
- vim
|
||||
---
|
||||
|
||||
Sometimes when typing vim will automatically start a newline. This is an expected behavior but at
|
||||
times can be really annoying. Ex working with macros, you can recored one on a short line that
|
||||
breaks on longer lines 😟. The amount of text before vim will break to new line while typing is
|
||||
controlled via the **textwidth** setting. So a fix is pretty simple. If don't want the behavior just set
|
||||
**textwidth** to a big number. ex:
|
||||
|
||||
```
|
||||
: set tw=500
|
||||
```
|
||||
|
||||
Here is a asciicast of the problem and solution in action:
|
||||
|
||||
{{< asciicast-with-caption id="353148" title="demo of setting tw" >}}
|
||||
|
||||
source -- https://stackoverflow.com/questions/1272173/in-vim-how-do-i-break-one-really-long-line-into-multiple-lines
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue