{"id":15700681,"url":"https://github.com/miguelmota/dotvim","last_synced_at":"2025-05-12T14:21:00.286Z","repository":{"id":14826104,"uuid":"17548838","full_name":"miguelmota/dotvim","owner":"miguelmota","description":"My vim config","archived":false,"fork":false,"pushed_at":"2024-11-28T13:32:46.000Z","size":1502,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T12:23:00.766Z","etag":null,"topics":["bundles","dotfiles","dotvim","plugins","vim","vimrc"],"latest_commit_sha":null,"homepage":"https://github.com/miguelmota/dotvim","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelmota.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-08T19:10:33.000Z","updated_at":"2024-11-28T13:32:49.000Z","dependencies_parsed_at":"2023-01-11T20:22:35.279Z","dependency_job_id":null,"html_url":"https://github.com/miguelmota/dotvim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmota%2Fdotvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmota%2Fdotvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmota%2Fdotvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmota%2Fdotvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelmota","download_url":"https://codeload.github.com/miguelmota/dotvim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243150970,"owners_count":20244490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundles","dotfiles","dotvim","plugins","vim","vimrc"],"created_at":"2024-10-03T19:52:16.485Z","updated_at":"2025-03-12T03:31:19.942Z","avatar_url":"https://github.com/miguelmota.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .vim\n\n\u003e My `~/.vim` and `~/.vimrc` configuration.\n\n## Install\n\n(Adjust accordingly)\n\n```bash\n# Create dotfiles directory\nmkdir ~/.dotfiles\n\n# Clone repo\ngit clone https://github.com/miguelmota/vim-config.git ~/.dotfiles/.vim\n\n# Create backup directory\nmkdir -p ~/.vim/backup\n\n# Create symlinks\nln -s ~/.dotfiles/.vim ~/.vim\nln -s ~/.dotfiles/.vim/.vimrc ~/.vimrc\n\n# Install Vundle bundle manager\ngit clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle\n\n# Install bundles (ignore errors about uninstalled bundles)\nvim +BundleInstall +qall\n```\n\nVundle commands\n\n```bash\n# Install bundles\nvim +BundleInstall +qall\n\n# Remove bundles\nvim +BundleClean\n\n# Update bundles\nvim +BundleUpdate\n```\n\n## Required dependencies\n\nlua\n\n```bash\n# mac\nbrew install vim --with-lua\n```\n\nFor installing vim with lua on Ubuntu see this gist [gist](https://gist.github.com/techgaun/2fe3dd3d004d7320a68d)\n\n[ctags](http://ctags.sourceforge.net/) for [ctrlp](https://github.com/kien/ctrlp.vim) and [tagbar](https://github.com/majutsushi/tagbar) plugins\n\n```bash\n# Mac OSX\nbrew install ctags\n\n# Ubuntu\nsudo apt-get install exuberant-ctags\n\n# fedora\nsudo dnf install ctags\n```\n\n[Tern](https://github.com/marijnh/tern) for [tern](https://github.com/marijnh/tern_for_vim) plugin\n\nMake sure to have [Node.js](http://nodejs.org/) and [npm](https://www.npmjs.org/) installed first. You can use [nvm](https://github.com/nvm-sh/nvm).\n\n```bash\ncd ~/.vim/bundle/tern_for_vim\n\nnpm install\n```\n\nYouCompleteMe completers\n\n```bash\n# ubuntu requirements\nsudo apt-get install python-dev python3-dev\n\n# fedora\nsudo dnf install cmake gcc-c++ python-devel python3-devel\n\n# arch\n\n```\n\n```bash\ncd ~/.vim/bundle/YouCompleteMe\n\ngit submodule update --init --recursive\n\n# tern is deprecated\nrm ~/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules\n\n./install.py --clang-completer --go-completer --ts-completer --js-completer --racer-completer\n\n# alternatively, compile with everything enabled\n./install.py --all\n```\n\nGetting Go v1.11 auto completer to work\n\n```bash\ncd ~/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/\nrm -rf gocode\ngit clone git@github.com:mdempsky/gocode.git\ncd gocode\ngo mod init\ngo build .\n```\n\nvim-completor\n\njavascript autocompleter\n\n```bash\ncd ~/.vim/bundle/completor.vim/\n# make sure to install tern first before this\nmake js\n```\n\nRust autocompleter\n\n```bash\n# requires nightly rust\nrustup toolchain add nightly\ncargo +nightly install racer\n```\n\nPython autocompleter\n\n```bash\npip install jedi\n```\n\nNOTE: if YouComplete server crashes, try running install script (shown above) again:\n\nPowerline\n\n[Powerline Installation instructions](http://powerline.readthedocs.org/en/latest/installation/osx.html)\n\nvim-go\n\n```bash\ngo get -u gopkg.in/alecthomas/gometalinter.v2\ngometalinter --install\n```\n\n[the_silver_searcher](https://github.com/ggreer/the_silver_searcher) for content searching (used with [FZF](https://github.com/junegunn/fzf.vim))\n\n```bash\nbrew install the_silver_searcher\n```\n\nAll done.\n\n## Installing bundles\n\nRun `BundleInstall` after adding a [Vundle](https://github.com/gmarik/Vundle.vim) bundle in `.vimrc`\n\n## Updating\n\n```bash\nwget https://raw.github.com/miguelmota/vim-config/master/update.sh -O - | bash\n```\n\n## Reference\n\nBelow are references for shortcuts and key bindings (to help me remember).\n\ntoggle comment\n\n```\n\u003cleader\u003ec\u003cspace\u003e\n```\n\nuncomment comment\n\n```\n\u003cleader\u003ecu\n```\n\ncomment out using asterisks\n\n```\n\u003cleader\u003ecs\n```\n\nctrlp Search/open files:\n\n`Ctrl+p`\n\n```\nhorizonal split\n\u003cc-x\u003e\n\nvertical split\n\u003cc-v\u003e\n```\n\nToggle fullscreen for a window (like in tmux)\n\n```\n\u003cC-w\u003e z\n```\n\nctrlp shortcuts\n\n[source](https://github.com/kien/ctrlp.vim)\n\nTurn off search highlight\n\n```\n:noh\n```\n\n```bash\nPress \u003cF5\u003e to purge the cache for the current directory to get new files.\nPress \u003cc-f\u003e and \u003cc-b\u003e to cycle between modes.\nPress \u003cc-d\u003e to switch to filename only search instead of full path.\nPress \u003cc-r\u003e to switch to regexp mode.\nUse \u003cc-j\u003e, \u003cc-k\u003e or the arrow keys to navigate the result list.\nUse \u003cc-t\u003e or \u003cc-v\u003e, \u003cc-x\u003e to open the selected entry in a new tab or in a new split.\nUse \u003cc-n\u003e, \u003cc-p\u003e to select the next/previous string in the prompt's history.\nUse \u003cc-y\u003e to create a new file and its parent directories.\nUse \u003cc-z\u003e to mark/unmark multiple files and \u003cc-o\u003e to open them.\n```\n\nToggle NERDTree:\n\n`\\ n`\n\nComment toggle:\n\nHightlight text in visual mode then type `\\ cc`\n\n`\\ cl|cb` - aligned to left\n`\\ cm` - multiline\n`\\ cs` - sexily\n\nClose tag:\n\n`Ctr + Shift + _`\n\nWindow switching:\n\n`Ctr + \u003cmovement key\u003e`\n\nPaste mode toggle:\n\n`F9`\n\nList mode toggle:\n\n`F10`\n\nStrip whitespace:\n\n`\\ ss`\n\nTabs to whitespace:\n\n\\ ts`\nReload vimrc:\n\n`\\ rv`\n\ndit #delete everything in tag\nvit\ncit # change insidej tag\nyit\n\nEady Motion:\n\n`\\ \\ w`\n\nBuffer shortcuts\n\n```\n:ls - list buffers\n:buffer \u003cnum\u003e\n:bn\n:bp\n```\n\nBuffergator toggle panel:\n\n`\\ b`\n\nBuffergator shortcuts:\n\n```bash\n\u003cC-V\u003e Open in vertical split\n\u003cC-S\u003e Open in horizontal split\n\u003cC-T\u003e Open in tab\nUse `[b` (or \u003cM-b\u003e) and `]b` (or \u003cM-S-b\u003e) to flip through the most-recently\nUse `\u003cLeader\u003e\u003cLEFT\u003e`, `\u003cLeader\u003e\u003cUP\u003e`, `\u003cLeader\u003e\u003cRIGHT\u003e`, `\u003cLeader\u003e\u003cDOWN\u003e` to\n```\n\nMini Buffer Explorer\n\ntoggle panel\n\n`\\ e`\n\nSwitch to buffer\n\n```bash\n number\u003cC-^\u003e\n ```\n\nRecording\n\n```\nq\u003cletter\u003e Start recording\nq Stop recording\n@\u003cletter\u003e Replay recording\n```\n\nvim-node open required module file\n\n`gf` on `require('.')` to open ./index.js`\n\nConqueTerm\n\nrun iteractive prompt\n\n```\n:ConqueTerm bash\n```\n\nGit\n\nCommon commands\n\n```\n:Gstatus\n:Gdiff :0\n:Gdiff [revision]\n:Gdiff ~3\n:Gblame\n:Glog\n:Gcommit -m \"message\"\n:Gremove\n```\n\nVim over (substitution preview)\n\n```\n:OverCommandLine\n\n\" shortcut\"\n\\ fr\n```\n\nVim obsession\n\n```\n:mksession\n:source Session.vim\n```\n\nVimux\n\n```\n\\ x # prompt command\n\\ nt # npm test\n```\n\nTmux complete\n\n```\nC-x C-u  # autcomplete\n```\n\nMultiple Cursors\n\n```\nC-n in Normal Mode\nC-n again to select next occurance\nv to go into Visual Mode after selections\n\nC-p in Visual Mode go back to previous cursor location\nC-x skip current location\n\n:'\u003c,'\u003eMultipleCursorsFind \u003cregex\u003e\n```\n\nNumber toggle\n\n```\n\u003cctrl-n\u003e\n```\n\nSyntastic\n\n```\n# toggle lint error list\n:lopen\n:lclose\n```\n\n##### Indentation\n\nVim defaults ([source](http://stackoverflow.com/questions/235839/how-do-i-indent-multiple-lines-quickly-in-vi))\n\n```bash\n\u003e\u003e   Indent line by shiftwidth spaces\n\u003c\u003c   De-indent line by shiftwidth spaces\n5\u003e\u003e  Indent 5 lines\n5==  Re-indent 5 lines\n\n\u003e%   Increase indent of a braced or bracketed block (place cursor on brace first)\n=%   Reindent a braced or bracketed block (cursor on brace)\n\u003c%   Decrease indent of a braced or bracketed block (cursor on brace)\n]p   Paste text, aligning indentation with surroundings\n\n=i{  Re-indent the \"inner block\", i.e. the contents of the block\n=a{  Re-indent \"a block\", i.e. block and containing braces\n=2a{ Re-indent \"2 blocks\", i.e. this block and containing block\n\n\u003ei{  Increase inner block indent\n\u003ci{  Decrease inner block indent\n```\n\nAck\n\n```bash\n:Ack -i 'util' -H 'app/'\n```\n\n##### Tern commands\n\n[source](https://github.com/marijnh/tern_for_vim)\n\n```bash\nTernDef: Jump to the definition of the thing under the cursor.\nTernDoc: Look up the documentation of something.\nTernType: Find the type of the thing under the cursor.\nTernRefs: Show all references to the variable or property under the cursor.\nTernRename: Rename the variable under the cursor.\n\n\u003cLeader\u003e td\t:TernDoc\tDocumentation under cursor\n\u003cLeader\u003e tb\t:TernDocBrowse\tBrowse documentation\n\u003cLeader\u003e tt\t:TernType\tType hints\n\u003cLeader\u003e td\t:TernDef\tJump to definition (yes, 'td' is duplicated)\n\u003cLeader\u003e tpd\t:TernDefPreview\tJump to definition inside preview\n\u003cLeader\u003e tsd\t:TernDefSplit\tDefinition in new split\n\u003cLeader\u003e ttd\t:TernDefTab\tDefinition in new tab\n\u003cLeader\u003e tr\t:TernRefs\tAll references under cursor\n\u003cLeader\u003e tR\t:TernRename\tRename variable\n```\n\n##### Vim fugitive commands\n\n```\n:help fugitive\n:Gblame\n:GBrowse\n```\n\n##### Lisp Swank server\n\n```\n# start server\n:call SlimvConnectSwank()\n\n# in source file, white over text do the following to:\n,d to eval defun\n,e to eval current expression\n,h hyperspec\n,s to describe symbol\n,g set package\n,W wrap in pair of parens\n,O split\n,J join\n,\u003e move paren right\n,\u003c move paren left\n,o some perf stuff\n,I remove line but\n,D compile defun\n,F compile file\n,L compile and load\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelmota%2Fdotvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelmota%2Fdotvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelmota%2Fdotvim/lists"}