mirror of
https://github.com/mhinz/vim-galore.git
synced 2025-02-24 01:59:28 +08:00
Tips: smarter cursorline
This commit is contained in:
parent
bc67c92407
commit
c27bdfbc29
@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Commands: [:redir](README.md#redir)
|
- Commands: [:redir](README.md#redir)
|
||||||
- Tips: [Saner command-line history](README.md#saner-command-line-history)
|
- Tips: [Saner command-line history](README.md#saner-command-line-history)
|
||||||
- Tips: [Reload a file on saving](README.md#reload-a-file-on-saving)
|
- Tips: [Reload a file on saving](README.md#reload-a-file-on-saving)
|
||||||
|
- Tips: [Smarter cursorline](README.md#smarter-cursorline)
|
||||||
- Usage: [Editing remote files](README.md#editing-remote-files)
|
- Usage: [Editing remote files](README.md#editing-remote-files)
|
||||||
- Usage: [Restore cursor position when opening file](README.md#restore-cursor-position-when-opening-file)
|
- Usage: [Restore cursor position when opening file](README.md#restore-cursor-position-when-opening-file)
|
||||||
- Usage: [MatchIt](README.md#matchit)
|
- Usage: [MatchIt](README.md#matchit)
|
||||||
|
13
README.md
13
README.md
@ -57,6 +57,7 @@ added every day. Things about to be added can be found here:
|
|||||||
- [Change cursor style in insert mode](#change-cursor-style-in-insert-mode)
|
- [Change cursor style in insert mode](#change-cursor-style-in-insert-mode)
|
||||||
- [Don't lose selection when shifting sidewards](#dont-lose-selection-when-shifting-sidewards)
|
- [Don't lose selection when shifting sidewards](#dont-lose-selection-when-shifting-sidewards)
|
||||||
- [Reload a file on saving](#reload-a-file-on-saving)
|
- [Reload a file on saving](#reload-a-file-on-saving)
|
||||||
|
- [Smarter cursorline](#smarter-cursorline)
|
||||||
|
|
||||||
#### [Commands](#commands-1)
|
#### [Commands](#commands-1)
|
||||||
|
|
||||||
@ -1204,6 +1205,18 @@ autocmd BufWritePost $MYVIMRC source $MYVIMRC
|
|||||||
autocmd BufWritePost ~/.Xdefaults call system('xrdb ~/.Xdefaults')
|
autocmd BufWritePost ~/.Xdefaults call system('xrdb ~/.Xdefaults')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Smarter cursorline
|
||||||
|
|
||||||
|
I love the cursorline, but I only want to use it in the current window and not
|
||||||
|
when being in insert mode:
|
||||||
|
|
||||||
|
```viml
|
||||||
|
autocmd WinEnter * set cursorline
|
||||||
|
autocmd WinLeave * set nocursorline
|
||||||
|
autocmd InsertEnter * set nocursorline
|
||||||
|
autocmd InsertLeave * set cursorline
|
||||||
|
```
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
Useful commands that are good to know.
|
Useful commands that are good to know.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user