This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| vim [2021/01/03 16:22] – created - external edit 127.0.0.1 | vim [2025/10/27 03:31] (current) – zhangyk | ||
|---|---|---|---|
| Line 26: | Line 26: | ||
| ===== How to change default font in windows ===== | ===== How to change default font in windows ===== | ||
| * In C: | * In C: | ||
| + | |||
| + | (The # shall be removed.) | ||
| < | < | ||
| if has(" | if has(" | ||
| - | set guifont=Consolas/ | + | |
| elseif has(" | elseif has(" | ||
| - | set guifont=Consolas\ 13 | + | |
| elseif has(" | elseif has(" | ||
| if has(" | if has(" | ||
| - | set guifont=Consolas: | + | |
| else | else | ||
| - | set guifont=-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1 | + | |
| endif | endif | ||
| endif | endif | ||
| Line 42: | Line 44: | ||
| ===== How to enable ctrl+c/ | ===== How to enable ctrl+c/ | ||
| * Add " | * Add " | ||
| + | |||
| + | < | ||
| + | # Tricks | ||
| + | |||
| + | ## Vertical rulers on a specific column | ||
| + | |||
| + | [Setup a Ruler on a Specific Column in Vim | Baeldung on Linux](https:// | ||
| + | |||
| + | In python' | ||
| + | |||
| + | You can add a vertical ruler by typing: | ||
| + | ``` | ||
| + | :set colorcolumn=72, | ||
| + | ``` | ||
| + | The line's color can be adjusted, `ctermbg` for vim called from terminal while `guibg` for vim called from GUI (which is gvim) | ||
| + | ``` | ||
| + | :highlight colorcolumn ctermbg=lightgrey guibg=lightgrey | ||
| + | ``` | ||
| + | |||
| + | The two lines can be added to `~/.vimrc` for automatic loading. (The # shall be removed.) | ||
| + | ``` | ||
| + | #set colorcolumn=72, | ||
| + | highlight colorcolumn ctermbg=lightgrey guibg=lightgrey | ||
| + | ``` | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||