SNCA:Vim

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
they do really look like this

Vim (Vi IMproved) is a simple text editor loved by both chuddies and trannies. It's based on the standard UNIX editor Vi. It remains a popular environment for developers because of it's main feature of modal editing, which minimizes the amount of keystrokes needed for performing tasks, thus greatly reducing strain.

Learning Vim[edit | edit source]

General Advice[edit | edit source]

  • It may be tempting to use the arrow, delete, backspace, home, pageup, pagedown, and end keys, but do not.
  • When performing a task, always think about how to minimize the amount of keystrokes for it. Research online.
  • Keep a cheat sheet, write down new commands you want to learn, keep only several or so commands at a time until you've learned them.

Cheat sheets[edit | edit source]

Vim Cheat Sheet for programmers
Vim Cheat Sheet for programmers

Vim Cheat Sheet for programmers

For Beginners[edit | edit source]

Configuration[edit | edit source]

All configuration is kept in the ~/.vimrc file, ~ being your home directory. It is advisable to look up existing online vimrc's but do not just copy them. In Vim, :h each entry, read the description and decide for yourself if you want them.

Well documented base to start out with: https://github.com/timss/vimconf

Vimium[edit | edit source]

Main page of this very wiki with the Vimium

Vimium is a browser extension that allows you to use your browser in a similar way as vim. It's available for Firefox, Chrome and Edge. When you press the "F" key, it shows different key combinations above hyperlinks and files that allows you to use your browser almost completely without a mouse. Use Shift+F to open a link in a new tab.

Plugins[edit | edit source]

Buffer Navigation[edit | edit source]

  • Tagbar - Tag navigation, requires a ctags package.
  • CtrlP - Fuzzy file, buffer, mru, tag, etc finder.
  • Incsearch.vim - futher expands the power of incremental-search in vim
  • EasyMotion - Spatial navigation, saves a lot of keystrokes.
  • targets.vim - adds extra motions to text objects
  • Sneak - maps the s command (and optionally t/T/f/F) to search line-wise (minimalistic alternative to easymotion)

File Navigation[edit | edit source]

  • CtrlP - Fuzzy file, buffer, mru, tag, etc finder.
  • NERDTree - Tree explorer plugin.
  • VimFiler - similar to built-in netrw but with improvements and fixes

Task Automation[edit | edit source]

  • EasyAlign - Tool for aligning multiple lines of text in columns.
  • DelimitMate - Auto-completes surroundings and provides bindings for navigating through them.
  • Vim-Surround - Manipulates (insert, change, delete) pairs of surroundings.
  • NERDCommenter - Manipulates code comments according to the file type.
  • AutoComplPop - Basic pop-up keyword-based completion.
  • Emmet - Powerful text-expansion for HTML/XML markup
  • Vim-repeat - expands the .(repeat) power of the command

Code Insertion/Completion[edit | edit source]

  • UltiSnips - Customizable snippet engine for boilerplate code time-saving.
  • Syntastic - Syntax checking.
  • Neocomplete - code completion engine with caching
  • YouCompleteMe - Advanced semantic code completion engine.
  • Eclim - Code completion making use of Eclipse's engine.

Miscellaneous[edit | edit source]

  • Vim-Sensible - Provides a number of common and sane configurations.
  • vim-unimpaired - Miscellaneous mappings for simple tasks
  • SudoEdit - Edit files using sudo or su or any other tool.
  • Multiple Cursors - Sublime Text style multiple selections
  • Minimap - Minimap implementation similar to the one found in Sublime Text

Ricing[edit | edit source]

  • AirLine - Status line with many out-of-the-box features and integration with other plugins.
  • LightLine - Status line with emphasis on minimalism and customizability.
  • Vivify - Color scheme editor for Vim

External Links[edit | edit source]

Vim is part of a series on
Computing

>pssttt... nusoi... use free software.

➜ /languages

├ /markup/ HTMLCSSXML
├ /low_level/ AssemblyCC++C#Holy CRust
├ /high_level/ JavaGoPHPPythonSQLBashJavaScriptPowerShellActionScriptScratchRubyLuaP
└ /tutorials/ CC++C#JavaRust

➜ /software

├ /imageboards/ nusoiVichanYotsubaOpenYotsuba
├ /operating_systems/ WindowsLinuxAndroidTempleOSBSD
├ /applications/ Web BrowserPhotoshopFlashMS PaintIRC
├ /dev/ Free-software licenseGame developmentVim
└ /misc/ BabybotMcChallengeCAPTCHASystemdRAIDRicing4getSnarkysnappydoxingtool.batJS PaintSoyjak Party Enhanced

➜ /cyb

➜ /misc

├ /file_formats/ GIFMIDISVGWEBMWEBP
└ /hardware/ ThinkPadChromebooksWiFi

➜ /ai

SOYNY