mirror of
https://github.com/mhinz/vim-galore.git
synced 2025-02-23 17:49:28 +08:00
Tips: quickly jump to header or source file
This commit is contained in:
parent
98c42ddb77
commit
405b113f94
@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Tips: [Quickly move current line](README.md#quickly-move-current-line)
|
||||
- Tips: [Quickly add empty lines](README.md#quickly-add-empty-lines)
|
||||
- Tips: [Quickly edit your macros](README.md#quickly-edit-your-macros)
|
||||
- Tips: [Quickly jump to header or source file](README.md#quickly-jump-to-header-or-source-file)
|
||||
- Tips: [Don't lose selection when shifting sidewards](README.md#dont-lose-selection-when-shifting-sidewards)
|
||||
|
||||
## [1.0] - 2016-01-06
|
||||
|
11
README.md
11
README.md
@ -21,6 +21,7 @@
|
||||
- [Quickly move current line](#quickly-move-current-line)
|
||||
- [Quickly add empty lines](#quickly-add-empty-lines)
|
||||
- [Quickly edit your macros](#quickly-edit-your-macros)
|
||||
- [Quickly jump to header or source file](#quickly-jump-to-header-or-source-file)
|
||||
- [Don't lose selection when shifting sidewards](#dont-lose-selection-when-shifting-sidewards)
|
||||
|
||||
#### [Debugging](#debugging-1)
|
||||
@ -395,6 +396,16 @@ nnoremap <leader>m :<c-u><c-r>='let @'. v:register .' = '. string(getreg(v:regi
|
||||
```
|
||||
Use it like this `<leader>m` or `"q<leader>m`.
|
||||
|
||||
#### Quickly jump to header or source file
|
||||
|
||||
This technique can probably be applied to many filetypes. It sets _file marks_
|
||||
(see `:h marks`) when leaving a source or header file, so you can quickly jump
|
||||
back to the last accessed one by using `'C` or `'H` (see `:h 'A`).
|
||||
```viml
|
||||
autocmd BufLeave *.{c,cpp} mark C
|
||||
autocmd BufLeave *.h mark H
|
||||
```
|
||||
|
||||
#### Don't lose selection when shifting sidewards
|
||||
|
||||
If you select one or more lines, you can use `<` and `>` for shifting them
|
||||
|
Loading…
x
Reference in New Issue
Block a user