Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/dotvimPublic

My dotvim - work in progress - Beta stages

License

NotificationsYou must be signed in to change notification settings

ik5/dotvim

Repository files navigation

The following (Neo)Vim configuration is to help me work with programming.

The reason for it, is that I work with many of technologies, some even on the same project.

The main technologies that I'm placing emphases on are:

  • Ruby
  • Go
  • HTML
  • CSS
  • Javascript (React/JSX, Vue, es6, es7, babel)
  • Elm
  • XML
  • Rust
  • C
  • Python

There is also support for spelling, thesaurus, language server protocol, betterhighlighting of actions and a lot more.

Table Of Content

Features

  • vimrc handling
  • Incremental and smart case search
  • Information on trailing whitespace, including cleaning shortcuts
  • Logical and Visual layout (for Right-To-Left languages) editing
  • Tabs expanded to 2 spaces by default, except for Python
  • Keeping the<Leader> key as Backslash
  • AddingXX in edit mode to become alias to the<ESC> key
  • Highlight current row and color column 80
  • Syntax checking
  • Snippets
  • Completion Quotes, parenthesis pairs, etc
  • Extended pair matching with %
  • ASCII and table drawing
  • Fuzzy file, buffer, MRU, tag, etc finder
  • Task list
  • VCS support
  • Tab Completion
  • Commenting
  • History management, including persistent undo
  • Support documentation for programming languages, based on the original (neo)vim documentation engine
    • In-line documentation
    • Support for external documentation using Zeal
  • Reload file when changed from outside
  • Working with error window (a.k.a. quickfix and selection list)
  • Thesaurus, grammer and dictionary spelling
  • Language Server support
  • NeoVim Support

Installation

The following commands will clone the repo, symlink ~/.vimrc and update the bundles:

git clone https://github.com/ik5/dotvim.git ~/.vimln -s ~/.vim/vimrc ~/.vimrccd ~/.vimcurl -fLo ~/.vim/autoload/plug.vim --create-dirs \    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Install plugins from the command line:

vim +PlugUpdate +qa

For Neovim, under ~/.config/nvim:

curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \   https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Install plugins from the command line:

nvim +PlugUpdate +qa

To add or override settings, place them in~/.vim/vimrc.local or~/.config/nvim/vimrc.local.

To update submodules in the future, when you have vim running, source vimrc to make sure plugins list are updated (orrestart vim):

:PlugUpdate

Upgrading

In case you're updating from previous Vundle based to vim-plug, remove the bundle directory as it's not needed anymore,get vim-plug and install the plugins:

cd ~/.vimrm -rf bundlecurl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vimvim +PlugUpdate +qa

Commands

General

CommandDescription
WrSave current buffer usingsudo
HTemOpen Horizontal terminal in NeoVim
VTermOpen Vertical terminal in NeoVim
FormatJSONFormat a given JSON buffer
GenerateUUIDGenerate UUID and insert it to current cursor position
RebaseSquashPerform apick strategy for squash on rebase in GIT
CloseOthersClose all windows and tabs but the current active one
FixDoubleQuotesReplace unicode double quotes to ascii's version
ToUnixFFSet current file ending to Unix
Base64EncodeEncode a (range of) string/bytes to base 64
Base64DecodeDecode a (range of) base64 to string/bytes

Shortcuts

General

KeyDescription
\\<Leader> (as a default)
jj<ESC> on insert mode
<leader>+rLoad .vimrc
<leader>+RReload vim
KShow documentation under the cursor
<leader>wFast save current file (will not work on a buffer without file name)
<c-J> /<c-Down>Navigate window / terminal - go down
<c-K> /<c-Up>Navigate window / terminal- go up
<c-H> /<c-Left>Navigate window / terminal- go left
<c-L> /<c-Right>Navigate window / terminal- go right
<c-W>Window functions on insert mode as well
- /+Resize horizontal splits
<alt-,> /<alt-.>Resize vertical splits
<F2>Close (but not delete) current buffer
<leader>dDelete current buffer
<leader>DDelete current buffer, but keep the split (switch to prev buffer)
<leader>SDelete trailing whitespace
<F5>Toggle hlsearch
<leader>srlnClear the search register, so the last search is gone
<c-d> /<c-u>Center line when moving up and down half a screen
<Alt-j>Move current line down
<Alt-k>Move current line up
gcswap current char with the next char
gCswap current char with the prev char
glswap current word with the prev word, stay on the same position
grswap current word with the next word, stay on the same position
g{swap current paragraph with the next
g}swap current paragraph with the prev
SPTToggle spelling mode
<leader>snMove to the next misspelled word
<leader>spMove to the previous misspelled word
<leader>saAdd misspelled word under the cursor
<leader>s?Open suggestion window
<leader>f1 -<leader>f9Set fold level between 1 and 9
<leader>mRemove ^M when encoding is messed up (windows)
<c-b>bToggle between last two files
<c-b>pPrevious buffer
<c-b>nNext buffer
<leader>yCopy the current visual selection or current line to~/tmp/.vbuf file
<leader>pPaste the content of the buffer to~/tmp/.vbuf file
YCopy from cursor to the end of the line
gpvisual reselect of what was yanked
<leader>ffDisplay all keywords under the cursor and prompt to go for one of them
<leader>qClose all windows except active one
<c-f>Print full path
<leader><c-w>Exit diff mode
<leader>hcToggle view of hidden chars
<leader>wrpToggle wrap mode
<leader>srtSort numbers in paragraph/selection
<c-PageDown>Go to next tab
<c-PageUp>Go to prev tab
<C-O>Set :tabnew command and wait for a name to be placed
<C-T>Open new tab
<S-Tab>Execute :retab to set thw whole buffer at the same whitespace type
<leader>TOpen new terminal in NeoVim
<leader>relToggle between normal and relative numbers
<leader>currToggle cursor row indicator
<leader>curcToggle cursor column indicator
<ALT+d> /<leader>bfnToggle between open buffers goto next buffer
<ALT+a> /<leader>bfpToggle between open buffers goto prev buffer
<SPACE>xDelete next buffer
<leader>sr"Surround a word with "
<leader>sr'Surround a word with '
<leader>sr`Surround a word with `
<leader>sr(Surround a word with (), going to beginning of a word. if already there, going to the previous word
<leader>sr)Surround a word with (), from cursor location to the end of the word
<leader>sr[Surround a word with [], going to beginning of a word. if already there, going to the previous word
<leader>sr]Surround a word with [], from cursor location to the end of the word
<leader>sr{Surround a word with {}, going to beginning of a word. if already there, going to the previous word
<leader>sr}Surround a word with {}, from cursor location to the end of the word
<leader>=Adjust viewport to the middle
,fFind file and open it for edit
,sFind file and open it for edit in horizontal split
,vFind file and open it for edit in vertical split
,tFind file and open it for edit in new tab
<C-x><C-o>Open omnicomplete

Right To Left

KeyDescription
<F8>Toggle visual order editing
<F9>Toggle logical order editing

VCS (General)

KeyDescription
<leader>vcsfcFind merge conflict markers

ALE

KeyDescription
<c-j>Go to next error reported byALE
<c-k>Go to prev error reported byALE

BufExplorer

KeyDescription
<m-F11>ToggleBufExplorer

Fugitive

KeyDescription
<leader>gitbgit blame
<leader>gitcgit commit
<leader>gitvdvertical git diff
<leader>git/git grep
<leader>git?git status
<leader>gitpsgit push
<leader>gitplgit pull
<leader>gitftgit fetch
<leader>gitwgit add current file
<leader>gitlggit log -L
<leader>gitdelgit rm
<leader>gitBopen current buffer in remote location using web browser
<leader>gitotPrompts for creating new branch (checkout -B)

gitgutter

KeyDescription
]hNext gutter change under cursor
[hPrev gutter change under cursor
<leader>githsGutter set stage under cursor
<leader>githuGutter undo non staged lines under cursor
<leader>githvGutter Preview changes under cursor

Emmet

KeyDescription
<c-y>,Completecurrent tags and snippets

NerdTree

KeyDescription
<F3>Toggle NerdTree

Python mode

KeyDescription
[[Jump to previous class or function (normal, visual, operator modes)
]]Jump to next class or function (normal, visual, operator modes)
[MJump to previous class or method (normal, visual, operator modes)
]MJump to next class or method (normal, visual, operator modes)
aCSelect a class. Ex: vaC, daC, yaC, caC (normal, operator modes)
iCSelect inner class. Ex: viC, diC, yiC, ciC (normal, operator modes)
aMSelect a function or method. Ex: vaM, daM, yaM, caM (normal, operator modes)
iMSelect inner function or method. Ex: viM, diM, yiM, ciM (normal, operator modes)
<C-C>gGo to object definition
<C-c>rrRename classes, functions, modules, packages, methods, variables and keyword arguments
<C-c>r1rRename current module
<C-c>roOrganize imports sorts imports, too. It does that according to PEP8. Unused imports will be dropped.
<C-c>raInsert import for current word under cursor
<C-c>r1pConvert current module to package
<C-c>rm /<C-c>rlExtract method/variable from selected lines.
<C-c>ruTry to find the places in which a function can be used and changes the code to call it instead
<C-c>rvWhen a refactoring needed for methods of a class. In this refactoring, a method of a class is moved to the class of one of its attributes. The old method will call the new method. If you want to change all of the occurrences of the old method to use the new method you can inline it afterwards.
<C-c>rsChange function signature

ripgrep

KeyDescription
g/Look at all files from current position and sub directories
g*Look at all files from current position and sub directories force the print of directories if not printed
gaLook at all files from current position and sub directories, append errors
gwLook at all files from current postion and sub directories for current work under the cursor

Tagbar

KeyDescription
<F4>Toggle Tagbar

TComment

KeyDescription
[num]<leader>ccComment out current line(s)
[num]<leader>cuUncomment current line(s)

UltraSnippets

KeyDescription
<c-tab> /<c-j>List snippets foreword
<s-tab> /<c-k>List snippets backward

UndoTree

KeyDescription
<leader>undoToggle undo tree

Fixmyjs

KeyDescription
<c-l>Auto fix Javascript using eslint

Go

KeyDescription
<leader>godocCreate Godoc comment
<leader>gosShow a list of interfaces which implemented by the type under your cursor
<leader>goiShow type info for the word under your cursor
<leader>gohOpen godoc horizontal
<leader>govOpen godoc vertical
<leader>gobdOpen godoc browser
<leader>goaSwitch between test and source files
<leader>go`Add default tags to struct (e.g. JSON)
<leader>goTOpens a command forGoAddTags allowing to place the needed tag names
<leader>govGoto declaration/definition, in a vertical window
<leader>gdGoto declaration/definition, in a horizontal window
<leader>golGo meta linter
<leader>gobBuild go project
<leader>gotExecute Go tests
<leader>gorExecute Go project
<leader>goeExecute Go install
<leader>gocExecute test covers
<leader>go<c-l>Execute all possilbe linters
<leader>gofFill Struct with empty values
<leader>gofitemplate forif err ...

Twiggy

KeyDescription
<leader>gitBToggle twiggy

SplitJoin.vim

KeyDescription
<leader>sjjJoin lines
<leader>sjsSplit lines

Ruby

keyDescription
<leader>rbtExecute current spec file
<leader>rbsExecute nearest spec file
<leader>rblExecute last spec file
<leader>rbaExecute all spec files
<leader>dbgAddrequire pry; binding.pry to the current location

Far

keyDescription
<leader>farCall Far command

vim Conflicted

KeyDescription
dgudiffget from the upstream version
dgldiffget from the local version

Denite

keyDescription
;Browse current open buffers
<leader>;Browse list of files in current directory
<leader>grSearch current directory for occurences of given term and close window if no results
<leader>WrdSearch current directory for occurences of word under cursor

vim surround

KeyDescription

targets

KeyDescription

TextObj-URI

KeyDescription
<action>iuWork on internal URI
<action>auWork on entire URI
goOpen/Run url

Plugins

NameDescription

| | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | || | |

About

My dotvim - work in progress - Beta stages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp