Compare commits

...

32 Commits
v1.3 ... master

Author SHA1 Message Date
Marco Hinz
604f1a6f39
PLUGINS: add a few more recent colorschemes 2021-04-16 18:56:08 +02:00
Marco Hinz
ffd73c57c1
Improve "cnoremap <c-n>" mapping
Closes https://github.com/mhinz/vim-galore/issues/148
2021-04-13 15:47:24 +02:00
Marco Hinz
5021813f96
Use publisher site instead of Amazon for Practical Vim 2021-04-13 15:22:20 +02:00
Marco Hinz
582c81bdf3
PLUGINS: add more LSP plugins 2021-04-13 15:19:00 +02:00
jrop
3f250014cb
PLUGINS: add coc.nvim (#147) 2021-04-13 15:10:53 +02:00
Marco Hinz
412487cab6
Remove Travis CI 2021-04-13 15:06:01 +02:00
venkatesh k l
3b872dd97a
Minimal vimrc: fix link for temporary files (#156)
The link in the comment at line 54 was broken. Fixed it by pointing to https://github.com/mhinz/vim-galore#temporary-files
2021-04-13 13:42:31 +02:00
Peter Thaleikis
b1bcb6f60f
README: typo (#157) 2021-04-13 13:40:15 +02:00
Julian Hatzky
b709246b74
README: typo (#158) 2021-04-13 13:39:16 +02:00
Eliaz Bobadilla
8d897c0a17
Use Code of Conduct 2.0 (#160)
https://www.contributor-covenant.org/version/2/0/code_of_conduct
2021-04-13 13:38:03 +02:00
Marco Hinz
2ad6c17ab8
Easter egg: :hi! 2021-04-13 13:31:35 +02:00
Kyoz
b1a26b3135
Add Vietnamese Translation (#159) 2021-01-17 13:44:54 +01:00
Marco Hinz
d0bd3cf589
CI: go 1.10 -> 1.13 2019-11-05 23:47:55 +01:00
Marco Hinz
fa07baec6c
PLUGINS: add vim-crates for Rust 2019-11-05 22:19:31 +01:00
Marco Hinz
b64abe3e6a
Profiling: add example for :prof during startup 2019-10-07 19:56:02 +02:00
Nick Katunou
058a090065 Cheatsheets: remove obsolete link (#145) 2019-10-03 20:03:09 +02:00
Marco Hinz
85489f9a7f
Autocmds: use less technical wording
Closes https://github.com/mhinz/vim-galore/issues/144
2019-05-06 00:42:02 +02:00
Marco Hinz
8a4cb44704
PLUGINS: add Rust plugins 2019-02-28 21:16:05 +01:00
Marco Hinz
2d476c1efb
Plugins: add new section for database plugins 2019-02-24 20:52:09 +01:00
Marco Hinz
c6326fe2e2
Terminology: Vim script? Vimscript? VimL? 2019-02-10 17:20:10 +01:00
Marco Hinz
363a74febd
PLUGINS: add LeaderF to fuzzy finders
Closes #143
2019-01-12 12:22:38 +01:00
Marco Hinz
3235ef7479
PLUGINS: add vim-twiggy 2018-12-29 20:32:02 +01:00
Marco Hinz
4a25df91a3
PLUGINS: add vim-rtags 2018-12-28 19:59:18 +01:00
Andrei Gasparovici
4550a3af77 Add :TOhtml to misc section 2018-11-04 17:53:39 +01:00
Andrei Gasparovici
4fc7ac9755 PLUGINS: add vim-jsx to JS plugins 2018-11-04 17:53:39 +01:00
Foryah
a49607fc45 PLUGINS: add writing plugins (#142) 2018-10-31 21:45:28 +01:00
Marco Hinz
046b48f322
README: add Derek Wyatt's screencasts
Closes #139
2018-10-03 16:30:43 +02:00
Marco Hinz
c079239172
README: reword standard plugins section
Closes #138
2018-10-03 16:21:14 +02:00
Asheq Imran
765dcc6809 README: add mappings for saner behavior of and N (#137)
Add visual and operator-pending modes mappings
2018-10-03 14:00:06 +02:00
Marco Hinz
05ccf170ef
README: limit to 80 characters 2018-10-03 13:59:00 +02:00
Marco Hinz
83049cac26
CI: go 1.8 -> 1.10 2018-10-03 13:57:54 +02:00
Marco Hinz
8bc1efb762
Tips: Go to other end of selected text 2018-07-12 21:13:09 +02:00
5 changed files with 234 additions and 89 deletions

View File

@ -1,8 +0,0 @@
sudo: false
os: linux
language: go
go: 1.8
install: go get github.com/mhinz/gomali
script: gomali *.md

View File

@ -2,73 +2,131 @@
## Our Pledge ## Our Pledge
In the interest of fostering an open and welcoming environment, we as We as members, contributors, and leaders pledge to make participation in our
contributors and maintainers pledge to making participation in our project and community a harassment-free experience for everyone, regardless of age, body
our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender
size, disability, ethnicity, gender identity and expression, level of identity and expression, level of experience, education, socio-economic status,
experience, nationality, personal appearance, race, religion, or sexual identity nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation. and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards ## Our Standards
Examples of behavior that contributes to creating a positive environment Examples of behavior that contributes to a positive environment for our
include: community include:
* Using welcoming and inclusive language * Demonstrating empathy and kindness toward other people
* Being respectful of differing viewpoints and experiences * Being respectful of differing opinions, viewpoints, and experiences
* Gracefully accepting constructive criticism * Giving and gracefully accepting constructive feedback
* Focusing on what is best for the community * Accepting responsibility and apologizing to those affected by our mistakes,
* Showing empathy towards other community members and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior by participants include: Examples of unacceptable behavior include:
* The use of sexualized language or imagery and unwelcome sexual attention or * The use of sexualized language or imagery, and sexual attention or
advances advances of any kind
* Trolling, insulting/derogatory comments, and personal or political attacks * Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment * Public or private harassment
* Publishing others' private information, such as a physical or electronic * Publishing others' private information, such as a physical or email
address, without explicit permission address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a * Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Our Responsibilities ## Enforcement Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable Community leaders are responsible for clarifying and enforcing our standards of
behavior and are expected to take appropriate and fair corrective action in acceptable behavior and will take appropriate and fair corrective action in
response to any instances of unacceptable behavior. response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers have the right and responsibility to remove, edit, or Community leaders have the right and responsibility to remove, edit, or reject
reject comments, commits, code, wiki edits, issues, and other contributions comments, commits, code, wiki edits, issues, and other contributions that are
that are not aligned to this Code of Conduct, or to ban temporarily or not aligned to this Code of Conduct, and will communicate reasons for moderation
permanently any contributor for other behaviors that they deem inappropriate, decisions when appropriate.
threatening, offensive, or harmful.
## Scope ## Scope
This Code of Conduct applies both within project spaces and in public spaces This Code of Conduct applies within all community spaces, and also applies when
when an individual is representing the project or its community. Examples of an individual is officially representing the community in public spaces.
representing a project or community include using an official project e-mail Examples of representing our community include using an official e-mail address,
address, posting via an official social media account, or acting as an appointed posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be representative at an online or offline event.
further defined and clarified by project maintainers.
## Enforcement ## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at mh.codebro@gmail.com. All complaints reported to the community leaders responsible for enforcement at
will be reviewed and investigated and will result in a response that is deemed [INSERT CONTACT METHOD].
necessary and appropriate to the circumstances. The project team is obligated to All complaints will be reviewed and investigated promptly and fairly.
maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good All community leaders are obligated to respect the privacy and security of the
faith may face temporary or permanent repercussions as determined by other reporter of any incident.
members of the project's leadership.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution ## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version] version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
[homepage]: http://contributor-covenant.org Community Impact Guidelines were inspired by
[version]: http://contributor-covenant.org/version/1/4/ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@ -9,10 +9,12 @@
- [Code completion](#code-completion) - [Code completion](#code-completion)
- [Commenters](#commenters) - [Commenters](#commenters)
- [Cycle](#cycle) - [Cycle](#cycle)
- [Databases](#databases)
- [Delimiter](#delimiter) - [Delimiter](#delimiter)
- [Fuzzy finders](#fuzzy-finders) - [Fuzzy finders](#fuzzy-finders)
- [Grep tools](#grep-tools) - [Grep tools](#grep-tools)
- [Indent](#indent) - [Indent](#indent)
- [LSP](#lsp)
- [Misc](#misc) - [Misc](#misc)
- [Navigation](#navigation) - [Navigation](#navigation)
- [Plugin managers](#plugin-managers) - [Plugin managers](#plugin-managers)
@ -39,6 +41,7 @@
- [Lua](#lua) - [Lua](#lua)
- [PHP](#php) - [PHP](#php)
- [Python](#python) - [Python](#python)
- [Rust](#rust)
- [TeX](#tex) - [TeX](#tex)
- [VimL](#viml) - [VimL](#viml)
@ -49,6 +52,7 @@ Here's a list of commonly used colorschemes:
- [acme-colors](https://github.com/plan9-for-vimspace/acme-colors) - [acme-colors](https://github.com/plan9-for-vimspace/acme-colors)
- [apprentice](https://github.com/romainl/Apprentice) - [apprentice](https://github.com/romainl/Apprentice)
- [base16](https://github.com/chriskempson/base16-vim) - [base16](https://github.com/chriskempson/base16-vim)
- [dracula](https://github.com/dracula/vim)
- [gotham](https://github.com/whatyouhide/vim-gotham) - [gotham](https://github.com/whatyouhide/vim-gotham)
- [gruvbox](https://github.com/morhetz/gruvbox) - [gruvbox](https://github.com/morhetz/gruvbox)
- [janah](https://github.com/mhinz/vim-janah) - [janah](https://github.com/mhinz/vim-janah)
@ -56,7 +60,10 @@ Here's a list of commonly used colorschemes:
- [lucius](https://github.com/jonathanfilip/vim-lucius) - [lucius](https://github.com/jonathanfilip/vim-lucius)
- [molokai](https://github.com/tomasr/molokai) - [molokai](https://github.com/tomasr/molokai)
- [nofrils](https://github.com/robertmeta/nofrils) - [nofrils](https://github.com/robertmeta/nofrils)
- [nord](https://github.com/arcticicestudio/nord-vim)
- [oceanic-next](https://github.com/mhartington/oceanic-next) - [oceanic-next](https://github.com/mhartington/oceanic-next)
- [oceanic-next](https://github.com/mhartington/oceanic-next)
- [onedark](https://github.com/joshdick/onedark.vim)
- [paramount](https://github.com/owickstrom/vim-colors-paramount) - [paramount](https://github.com/owickstrom/vim-colors-paramount)
- [railscasts](https://github.com/jpo/vim-railscasts-theme) - [railscasts](https://github.com/jpo/vim-railscasts-theme)
- [seoul256](https://github.com/junegunn/seoul256.vim) - [seoul256](https://github.com/junegunn/seoul256.vim)
@ -106,6 +113,11 @@ or [Colortemplate](https://github.com/lifepillar/vim-colortemplate).
- [tcomment_vim](https://github.com/tomtom/tcomment_vim) - [tcomment_vim](https://github.com/tomtom/tcomment_vim)
- [vim-commentary](https://github.com/tpope/vim-commentary) - [vim-commentary](https://github.com/tpope/vim-commentary)
#### Databases
- [pgsql.vim](https://github.com/lifepillar/pgsql.vim)
- [vim-dadbod](https://github.com/tpope/vim-dadbod)
#### Delimiter #### Delimiter
- [auto-pairs](https://github.com/jiangmiao/auto-pairs) - [auto-pairs](https://github.com/jiangmiao/auto-pairs)
@ -118,8 +130,8 @@ or [Colortemplate](https://github.com/lifepillar/vim-colortemplate).
- [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim) - [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim)
- [denite.nvim](https://github.com/Shougo/denite.nvim) (_requires +python3_) - [denite.nvim](https://github.com/Shougo/denite.nvim) (_requires +python3_)
- [fzf](https://github.com/junegunn/fzf) (and [fzf.vim](https://github.com/junegunn/fzf.vim)) - [fzf](https://github.com/junegunn/fzf) (and [fzf.vim](https://github.com/junegunn/fzf.vim))
- [LeaderF](https://github.com/Yggdroot/LeaderF) (_requires +python or +python3_)
- [unite.vim](https://github.com/Shougo/unite.vim) - [unite.vim](https://github.com/Shougo/unite.vim)
- [vim-fz](https://github.com/mattn/vim-fz)
#### Grep tools #### Grep tools
@ -132,6 +144,15 @@ or [Colortemplate](https://github.com/lifepillar/vim-colortemplate).
- [indentLine](https://github.com/Yggdroot/indentLine) - [indentLine](https://github.com/Yggdroot/indentLine)
- [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides) - [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides)
#### LSP
Plugins for the [Language Server Protocol](https://microsoft.github.io/language-server-protocol)
- [coc.nvim](https://github.com/neoclide/coc.nvim)
- [languageclient-neovim](https://github.com/autozimu/LanguageClient-neovim)
- [vim-lsc](https://github.com/natebosch/vim-lsc)
- [vim-lsp](https://github.com/prabirshrestha/vim-lsp)
#### Navigation #### Navigation
- [nerdtree](https://github.com/scrooloose/nerdtree) - [nerdtree](https://github.com/scrooloose/nerdtree)
@ -222,12 +243,17 @@ Also see [fuzzy finders](#fuzzy-finders).
- [vim-github-dashboard](https://github.com/junegunn/vim-github-dashboard) - [vim-github-dashboard](https://github.com/junegunn/vim-github-dashboard)
- [vim-lawrencium](https://bitbucket.org/ludovicchabant/vim-lawrencium) - [vim-lawrencium](https://bitbucket.org/ludovicchabant/vim-lawrencium)
- [vim-signify](https://github.com/mhinz/vim-signify) - [vim-signify](https://github.com/mhinz/vim-signify)
- [vim-twiggy](https://github.com/sodapopcan/vim-twiggy)
- [vimagit](https://github.com/jreybert/vimagit) - [vimagit](https://github.com/jreybert/vimagit)
#### Writing #### Writing
- [thesaurus_query.vim](https://github.com/ron89/thesaurus_query.vim)
- [vim-grammarous](https://github.com/rhysd/vim-grammarous) - [vim-grammarous](https://github.com/rhysd/vim-grammarous)
- [vim-LanguageTool](https://github.com/dpelle/vim-LanguageTool)
- [vim-online-thesaurus](https://github.com/beloglazov/vim-online-thesaurus) - [vim-online-thesaurus](https://github.com/beloglazov/vim-online-thesaurus)
- [vim-textobj-quote](https://github.com/reedes/vim-textobj-quote)
- [vim-wordy](https://github.com/reedes/vim-wordy)
#### Misc #### Misc
@ -236,6 +262,7 @@ Also see [fuzzy finders](#fuzzy-finders).
- [FastFold](https://github.com/Konfekt/FastFold) - [FastFold](https://github.com/Konfekt/FastFold)
- [goyo.vim](https://github.com/junegunn/goyo.vim) - [goyo.vim](https://github.com/junegunn/goyo.vim)
- [is.vim](https://github.com/haya14busa/is.vim) - [is.vim](https://github.com/haya14busa/is.vim)
- [limelight.vim](https://github.com/junegunn/limelight.vim)
- [NrrwRgn](https://github.com/chrisbra/NrrwRgn) - [NrrwRgn](https://github.com/chrisbra/NrrwRgn)
- [sideways.vim](https://github.com/AndrewRadev/sideways.vim) - [sideways.vim](https://github.com/AndrewRadev/sideways.vim)
- [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim) - [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim)
@ -267,6 +294,7 @@ Also see [fuzzy finders](#fuzzy-finders).
- [color_coded](https://github.com/jeaye/color_coded) - [color_coded](https://github.com/jeaye/color_coded)
- [lh-cpp](https://github.com/LucHermitte/lh-cpp) - [lh-cpp](https://github.com/LucHermitte/lh-cpp)
- [vim-cpp-enhanced-highlight](https://github.com/octol/vim-cpp-enhanced-highlight) - [vim-cpp-enhanced-highlight](https://github.com/octol/vim-cpp-enhanced-highlight)
- [vim-rtags](https://github.com/lyuts/vim-rtags)
#### Clojure #### Clojure
@ -310,6 +338,7 @@ Also see [fuzzy finders](#fuzzy-finders).
- [vim-flow](https://github.com/flowtype/vim-flow) - [vim-flow](https://github.com/flowtype/vim-flow)
- [vim-javascript-syntax](https://github.com/jelera/vim-javascript-syntax) - [vim-javascript-syntax](https://github.com/jelera/vim-javascript-syntax)
- [vim-javascript](https://github.com/pangloss/vim-javascript) - [vim-javascript](https://github.com/pangloss/vim-javascript)
- [vim-jsx](https://github.com/mxw/vim-jsx)
- [vim-node](https://github.com/moll/vim-node) - [vim-node](https://github.com/moll/vim-node)
- [vim-prettier](https://github.com/prettier/vim-prettier) - [vim-prettier](https://github.com/prettier/vim-prettier)
- [yajs.vim](https://github.com/othree/yajs.vim) - [yajs.vim](https://github.com/othree/yajs.vim)
@ -336,6 +365,12 @@ Also see [fuzzy finders](#fuzzy-finders).
- [SimpylFold](https://github.com/tmhedberg/SimpylFold) - [SimpylFold](https://github.com/tmhedberg/SimpylFold)
- [vim-flake8](https://github.com/nvie/vim-flake8) - [vim-flake8](https://github.com/nvie/vim-flake8)
#### Rust
- [rust.vim](https://github.com/rust-lang/rust.vim)
- [vim-crates](https://github.com/mhinz/vim-crates)
- [vim-racer](https://github.com/racer-rust/vim-racer)
#### TeX #### TeX
- [vimtex](https://github.com/lervag/vimtex) - [vimtex](https://github.com/lervag/vimtex)

130
README.md
View File

@ -6,7 +6,8 @@
<a href='https://github.com/wsdjeg/vim-galore-zh_cn'>Chinese</a> | <a href='https://github.com/wsdjeg/vim-galore-zh_cn'>Chinese</a> |
<a href='http://postd.cc/?s=vim-galore'>Japanese</a> | <a href='http://postd.cc/?s=vim-galore'>Japanese</a> |
<a href='https://github.com/lsrdg/vim-galore'>Portuguese</a> | <a href='https://github.com/lsrdg/vim-galore'>Portuguese</a> |
<a href='http://givi.olnd.ru/vim-galore/vim-galore-ru.html'>Russian</a> <a href='http://givi.olnd.ru/vim-galore/vim-galore-ru.html'>Russian</a> |
<a href='https://github.com/kyoz/vim-galore-vi'>Vietnamese</a>
<div> <div>
<br /> <br />
<sub>Licensed under <a href='https://creativecommons.org/licenses/by-sa/4.0'>CC BY-SA 4.0<a/>.</sub> <sub>Licensed under <a href='https://creativecommons.org/licenses/by-sa/4.0'>CC BY-SA 4.0<a/>.</sub>
@ -74,6 +75,7 @@
### [Tips](#tips-1) ### [Tips](#tips-1)
- [Go to other end of selected text](#go-to-other-end-of-selected-text)
- [Saner behavior of n and N](#saner-behavior-of-n-and-n) - [Saner behavior of n and N](#saner-behavior-of-n-and-n)
- [Saner command-line history](#saner-command-line-history) - [Saner command-line history](#saner-command-line-history)
- [Saner CTRL-L](#saner-ctrl-l) - [Saner CTRL-L](#saner-ctrl-l)
@ -111,6 +113,7 @@
- [Vim distributions](#vim-distributions) - [Vim distributions](#vim-distributions)
- [Standard plugins](#standard-plugins) - [Standard plugins](#standard-plugins)
- [Map CapsLock to Control](#map-capslock-to-control) - [Map CapsLock to Control](#map-capslock-to-control)
- [Generating HTML from buffer](#generating-html-from-buffer)
- [Easter eggs](#easter-eggs) - [Easter eggs](#easter-eggs)
- [Why hjkl for navigation?](#why-hjkl-for-navigation) - [Why hjkl for navigation?](#why-hjkl-for-navigation)
@ -126,6 +129,10 @@
- [Newline used for NUL](#newline-used-for-nul) - [Newline used for NUL](#newline-used-for-nul)
### [Terminology](#terminology-1)
- [Vim script? Vimscript? VimL?](#vim-script-vimscript-viml)
### [List of colorschemes](PLUGINS.md#colorschemes-1) ### [List of colorschemes](PLUGINS.md#colorschemes-1)
### [List of plugins](PLUGINS.md) ### [List of plugins](PLUGINS.md)
@ -291,7 +298,6 @@ Help:
- http://people.csail.mit.edu/vgod/vim/vim-cheat-sheet-en.png - http://people.csail.mit.edu/vgod/vim/vim-cheat-sheet-en.png
- https://cdn.shopify.com/s/files/1/0165/4168/files/preview.png - https://cdn.shopify.com/s/files/1/0165/4168/files/preview.png
- http://www.nathael.org/Data/vi-vim-cheat-sheet.svg
- http://michael.peopleofhonoronly.com/vim/vim_cheat_sheet_for_programmers_screen.png - http://michael.peopleofhonoronly.com/vim/vim_cheat_sheet_for_programmers_screen.png
- http://www.rosipov.com/images/posts/vim-movement-commands-cheatsheet.png - http://www.rosipov.com/images/posts/vim-movement-commands-cheatsheet.png
@ -740,17 +746,17 @@ See `:h text-objects` for all available text objects.
## Autocmds ## Autocmds
On many occasions, Vim emits events. You hook into these events by using You can trigger an action after many events in Vim, such as a buffer being
autocmds. saved or Vim having started up, by so-called _autocmds_.
You wouldn't use Vim if there weren't autocmds. They're used all the time, even Vim relies extensively on autocmds. Don't believe me? Check `:au`, but don't let
if you don't notice it. Don't believe me? Check `:au`, but don't let the output the output overwhelm you. These are all the autocmds that are in effect right
overwhelm you. These are all the autocmds that are in effect right now! now!
See `:h {event}` for a quick overview of all available events and `:h See `:h {event}` for a quick overview of all available events and `:h
autocmd-events-abc` for more details. autocmd-events-abc` for more details.
A typical example would be setting filetype-specific settings: A typical example would be filetype-specific settings:
```vim ```vim
autocmd FileType ruby setlocal shiftwidth=2 softtabstop=2 comments-=:# autocmd FileType ruby setlocal shiftwidth=2 softtabstop=2 comments-=:#
@ -776,7 +782,7 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby
``` ```
The `BufNewFile` and `BufRead` events in this case are hardcoded in the C The `BufNewFile` and `BufRead` events in this case are hardcoded in the C
sources of Vim and get emitted everytime you open a file via `:e` and similar sources of Vim and get emitted every time you open a file via `:e` and similar
commands. Afterwards all the hundreds of filetypes from `filetype.vim` are commands. Afterwards all the hundreds of filetypes from `filetype.vim` are
tested for. tested for.
@ -1976,6 +1982,17 @@ https://gist.github.com/XVilka/8346728
# Tips # Tips
## Go to other end of selected text
`o` and `O` in a visual selection make the cursor go to the other end. Try with
blockwise selection to see the difference. This is useful for quickly changing
the size of the selected text.
```
:h v_o
:h v_O
```
## Saner behavior of n and N ## Saner behavior of n and N
The direction of `n` and `N` depends on whether `/` or `?` was used for The direction of `n` and `N` depends on whether `/` or `?` was used for
@ -1985,7 +2002,12 @@ If you want `n` to always search forward and `N` backward, use this:
```vim ```vim
nnoremap <expr> n 'Nn'[v:searchforward] nnoremap <expr> n 'Nn'[v:searchforward]
xnoremap <expr> n 'Nn'[v:searchforward]
onoremap <expr> n 'Nn'[v:searchforward]
nnoremap <expr> N 'nN'[v:searchforward] nnoremap <expr> N 'nN'[v:searchforward]
xnoremap <expr> N 'nN'[v:searchforward]
onoremap <expr> N 'nN'[v:searchforward]
``` ```
## Saner command-line history ## Saner command-line history
@ -1998,13 +2020,16 @@ So far, so good. But `<up>` and `<down>` are even smarter! They recall the
command-line whose beginning matches the current command-line. E.g. `:echo <up>` command-line whose beginning matches the current command-line. E.g. `:echo <up>`
may change to `:echo "Vim rocks!"`. may change to `:echo "Vim rocks!"`.
Of course, I don't want you to reach to the arrow keys, just map it instead: Of course, I don't want you to reach for the arrow keys:
```vim ```vim
cnoremap <c-n> <down> cnoremap <expr> <c-n> wildmenumode() ? "\<c-n>" : "\<down>"
cnoremap <c-p> <up> cnoremap <expr> <c-p> wildmenumode() ? "\<c-p>" : "\<up>"
``` ```
Here we also distinguish between command-line history and the wildmenu. See `:h
'wildmenu'`.
I depend on this behaviour several times a day. I depend on this behaviour several times a day.
## Saner CTRL-L ## Saner CTRL-L
@ -2177,8 +2202,8 @@ Always use a dark gray statusline, no matter what colorscheme is chosen:
autocmd ColorScheme * highlight StatusLine ctermbg=darkgray cterm=NONE guibg=darkgray gui=NONE autocmd ColorScheme * highlight StatusLine ctermbg=darkgray cterm=NONE guibg=darkgray gui=NONE
``` ```
This triggers every time you use `:colorscheme ...`. If you want it to trigger only for This triggers every time you use `:colorscheme ...`. If you want it to trigger
a certain colorscheme: only for a certain colorscheme:
```vim ```vim
autocmd ColorScheme desert highlight StatusLine ctermbg=darkgray cterm=NONE guibg=darkgray gui=NONE autocmd ColorScheme desert highlight StatusLine ctermbg=darkgray cterm=NONE guibg=darkgray gui=NONE
@ -2371,13 +2396,11 @@ profile.
If you want to profile _everything_, do this: If you want to profile _everything_, do this:
``` :profile start /tmp/profile.log
:profile start /tmp/profile.log :profile file *
:profile file * :profile func *
:profile func * <do something in Vim>
<do something in Vim> :qa
<quit Vim>
```
Vim keeps the profiling information in memory and only writes it out to the Vim keeps the profiling information in memory and only writes it out to the
logfile on exit. (Neovim has fixed this using `:profile dump`). logfile on exit. (Neovim has fixed this using `:profile dump`).
@ -2385,11 +2408,15 @@ logfile on exit. (Neovim has fixed this using `:profile dump`).
Have a look at `/tmp/profile.log`. All code that was executed during profiling Have a look at `/tmp/profile.log`. All code that was executed during profiling
will be shown. Every line, how often it was executed and how much time it took. will be shown. Every line, how often it was executed and how much time it took.
Most of the time that will be plugin code the user isn't familiar with, but if Jump to the bottom of the log. Here are two different sections `FUNCTIONS SORTED
you're investigating a certain issue, jump to the bottom of the log. Here are ON TOTAL TIME` and `FUNCTIONS SORTED ON SELF TIME` that are worth gold. At a
two different sections `FUNCTIONS SORTED ON TOTAL TIME` and `FUNCTIONS SORTED ON quick glance you can see which functions are taking the longest.
SELF TIME` that are worth gold. At a quick glance you can see, if a certain
function is taking too long. You can use `:profile` during startup as well:
$ vim --cmd 'prof start prof.log | prof file * | prof func *' test.c
:q
$ tail -50 prof.log
## Debugging Vim scripts ## Debugging Vim scripts
@ -2473,12 +2500,16 @@ See `:h :syntime`.
| [Seven habits of effective text editing 2.0 (PDF)](http://www.moolenaar.net/habits_2007.pdf) | See above. | | [Seven habits of effective text editing 2.0 (PDF)](http://www.moolenaar.net/habits_2007.pdf) | See above. |
| [IBM DeveloperWorks: Scripting the Vim editor](http://www.ibm.com/developerworks/views/linux/libraryview.jsp?sort_order=asc&sort_by=Title&search_by=scripting+the+vim+editor) | Five-part series on Vim scripting. | | [IBM DeveloperWorks: Scripting the Vim editor](http://www.ibm.com/developerworks/views/linux/libraryview.jsp?sort_order=asc&sort_by=Title&search_by=scripting+the+vim+editor) | Five-part series on Vim scripting. |
| [Learn Vimscript the Hard Way](http://learnvimscriptthehardway.stevelosh.com) | Develop a Vim plugin from scratch. | | [Learn Vimscript the Hard Way](http://learnvimscriptthehardway.stevelosh.com) | Develop a Vim plugin from scratch. |
| [Practical Vim (2nd Edition)](http://www.amazon.com/Practical-Vim-Edit-Speed-Thought/dp/1680501275/) | Hands down the best book about Vim. | | [Practical Vim (2nd Edition)](https://pragprog.com/titles/dnvim2/practical-vim-second-edition) | Hands down the best book about Vim. |
| [Vimcasts.org](http://vimcasts.org/episodes/archive) | Vim screencasts. |
| [wincent's screencasts on YouTube](https://www.youtube.com/channel/UCXPHFM88IlFn68OmLwtPmZA) | Vim screencasts. |
| [Why, oh WHY, do those #?@! nutheads use vi?](http://www.viemu.com/a-why-vi-vim.html) | Common misconceptions explained. | | [Why, oh WHY, do those #?@! nutheads use vi?](http://www.viemu.com/a-why-vi-vim.html) | Common misconceptions explained. |
| [Your problem with Vim is that you don't grok vi](http://stackoverflow.com/a/1220118) | Concise, informative and correct. A real gem. | | [Your problem with Vim is that you don't grok vi](http://stackoverflow.com/a/1220118) | Concise, informative and correct. A real gem. |
#### Screencasts
- [vimcasts.org](http://vimcasts.org/episodes/archive)
- [By wincent](https://www.youtube.com/channel/UCXPHFM88IlFn68OmLwtPmZA)
- [By Derek Wyatt](http://derekwyatt.org/vim/tutorials/index.html)
## Vim distributions ## Vim distributions
Vim distributions are bundles of custom settings and plugins for Vim. Vim distributions are bundles of custom settings and plugins for Vim.
@ -2504,13 +2535,15 @@ looking at a few distributions:
## Standard plugins ## Standard plugins
Surprising to many people, Vim comes with a handful of plugins on its own that Many people are surprised by the fact that Vim comes with a handful of standard
all get loaded by default. Check `:scriptnames` after starting Vim to see all plugins. Some get loaded by default (`:e $VIMRUNTIME/plugin`) and some are not
sourced files. (`:e $VIMRUNTIME/pack/dist/opt`). Read `:h pack-add` on how to source the
latter.
Most of them will never get used, so disable them as you see fit. They will Most of the plugins that get loaded by default will never get used, though.
still be shown as sourced, but only the first lines actually get read before Vim Disable them as you see fit. They will still be shown as sourced
bails out. No further code (mappings, commands, logic) will be processed. (`:scriptnames`), but only the first lines actually get read before Vim bails
out. No further code (mappings, commands, logic) will be processed.
| Plugin | Disable it using.. | Help | | Plugin | Disable it using.. | Help |
|------------|-------------------------------------|------| |------------|-------------------------------------|------|
@ -2560,6 +2593,21 @@ An alternative would be using [caps2esc](https://github.com/oblitum/caps2esc) or
See [superuser.com: Map Caps-Lock to Control in Windows See [superuser.com: Map Caps-Lock to Control in Windows
8.1](http://superuser.com/questions/764782/map-caps-lock-to-control-in-windows-8-1). 8.1](http://superuser.com/questions/764782/map-caps-lock-to-control-in-windows-8-1).
## Generating HTML from buffer
Generate HTML from any buffer using `:TOhtml` from the 2html [standard
plugin](#standard-plugins). The output can be used for printing or easy web
publishing.
The command creates a new buffer of the same name with `.html` appended. The
colors are the same as seen in Vim. They depend on the
[colorscheme](#colorschemes).
The plugin knows several options to finetune the output, e.g. for setting the
encoding and font.
See `:h :TOhtml`.
## Easter eggs ## Easter eggs
| Command | Message | | Command | Message |
@ -2573,6 +2621,7 @@ See [superuser.com: Map Caps-Lock to Control in Windows
| `:h map-modes` | `:nunmap can also be used outside of a monastery.` | | `:h map-modes` | `:nunmap can also be used outside of a monastery.` |
| `:help!` | `E478: Don't panic!` (Glitch? When used in a help buffer (`buftype=help`) this works like `:h help.txt` instead.) | | `:help!` | `E478: Don't panic!` (Glitch? When used in a help buffer (`buftype=help`) this works like `:h help.txt` instead.) |
| `:smile` | Try it out yourself. ;-) Added in 7.4.1005. | | `:smile` | Try it out yourself. ;-) Added in 7.4.1005. |
| `:hi!` | `Greetings, Vim user!` |
## Why hjkl for navigation? ## Why hjkl for navigation?
@ -2746,3 +2795,14 @@ displayed in a buffer as `^@`.
See `man 7 ascii` and `:h NL-used-for-Nul` for more information. See `man 7 ascii` and `:h NL-used-for-Nul` for more information.
# Terminology
## Vim script? Vimscript? VimL?
`Vim script`, `Vimscript`, and `VimL` all refer to the same thing: The
programming language used for scripting Vim. Even though
[8.0.360](https://github.com/vim/vim/commit/b544f3c81f1e6a50322855681ac266ffaa8e313c)
changed all references from `VimL` to `Vim script`, which can now be considered
the official term, `VimL` is still widespread all over the internet.
No matter which term you use, everyone will understand it.

View File

@ -51,7 +51,7 @@ if &shell =~# 'fish$'
endif endif
" Put all temporary files under the same directory. " Put all temporary files under the same directory.
" https://github.com/mhinz/vim-galore#handling-backup-swap-undo-and-viminfo-files " https://github.com/mhinz/vim-galore#temporary-files
set backup set backup
set backupdir =$HOME/.vim/files/backup/ set backupdir =$HOME/.vim/files/backup/
set backupext =-vimbackup set backupext =-vimbackup