Skip to content

stadniklksndr/gvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Install IDE

sudo apt-get install vim-gnome OR (sudo apt install vim-gtk3)
git clone https://github.com/stadniklksndr/gvim.git ~/.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
ln -s  ~/.vim/.vimrc ~/.vimrc
sudo apt install exuberant-ctags
sudo apt install fonts-powerline
sudo apt install wmctrl

BundleInstall - run from Vim command line 🐾

Install syntax checkers 💊

Commands 💾

  • G       - take me to the bottom of the page
  • gg     - take me to the top of the page
  • U - convert to uppercase (but firstly visually select text), u to convert to lowercase
  • {, } - skips block of code
  • 20j - move cursor to position + 20 line
  • 10k - move cursor to position - 10 line
  • 2} - move cursor to position + 2 block
  • 2{ - move cursor to position - 2 block
  • dd - delete line (also you can paste delited line using p)
  • u - undo delete
  • . - run last command again
  • yy - copy line
  • p - paste below
  • P - paste above
  • o - add new line below and put you in insert mode (letter)
  • O - add new line above and put you in insert mode
  • w - move to the next word
  • b - move in reverse direction
  • :20 - go to the specific line
  • 0 - takes you to the begin of current line (zero)
  • ^ - takes you to the bigin of code in current line
  • $ - takes you to the end of the line
  • t{any letter or sybol} - take you to chosen letter in line
  • f{letter || sybol} - takes you to letter and highlight it in line
  • % - switches between {, } and so on
  • d% - delete everything in (), for example (this will be deleted)
  • cw - reword word (set cursor at the begin of word)
  • dw - delete word (set cursor at the begin of word)
  • D - delete everything from tre right of cursor
  • C - delete everything from tre right and put you into insert mode
  • ct{letter || symbol} - delete everything up to chosen letter and put you into insert mode
  • dt{letter || symbol} - delete everything up to chosen letter
  • shift+* - highlight current word everything in the file
  • n - switches between highlighted words
  • a - takes you in insert mode over the one letter
  • A - takes you into insert mode to the end of the line
  • I - takes you into insert mode to start of the line
  • x - delete current letter
  • ~ - makes letter Up or Down
  • r{letter} - replaces letter
  • <, > - moves highlighted code
  • <<, >> - moves current line
  • put =expand('%:p') - insert lines consisting of the full path (https://vi.stackexchange.com/questions/104/how-can-i-see-the-full-path-of-the-current-file)
  • :mksession! ~/.vim_session - save all tabs before closing GVim
  • :source ~/.vim_session - restore session when reopening GVim

Marks

  • Use m{a-zA-z} to set a mark point in your document
  • Use '{a-zA-Z} to jump to a set mark point

Execute command

  • :!
  • :!ls - example
  • :!python % => % is current filename
  • :%s/foo/bar/g - find each occurrence of 'foo' (in all lines), and replace it with 'bar'
  • :6,10s/foo/bar/g - change each 'foo' to 'bar' for all lines from line 6 to line 10 inclusive.

Plugins 🚸

  • Plugin manager

  • Syntax checking

    • manual or :help syntastic-checkers

    • :SyntasticInfo ~ show you which checkers are enabled for current file

    • Current settings:

  • Status line at the bottom of each window

    • :h airline ~ airline-contents
  • Collection of themes for vim-airline

    • available themes
    • :AirlineTheme simple ~ set the theme from gvim
    • let g:airline_theme='simple' ~ set in .vimrc
  • Git wrapper

  • Tree explorer

    • :help NERDTree.txt ~ nerdtree contents
    • <F2> ~ open nerdtree
    • ww ~ new tab
    • ctrl+w+q ~ close tab
    • ctrl + (pgup/pgdn) ~ change tab
    • shift + i ~ toggle hidden files
    • NERDTreeHighlightFile ~ add/change nerdtree file highlighting from .vimrc
    • m ~ nerdtree menu for add, move, delete, and copy file (call from tree window)
    • f.a.q.
  • Showing git status flags

  • Git diff in the gutter

    • Jump between hunks:

      • ]c ~ jump to next hunk
      • [c ~ jump to previous hunk
    • Turn line highlighting on and off (defaults to off):

      • :GitGutterLineHighlightsEnable ~ turn on
      • :GitGutterLineHighlightsDisable ~ turn off
  • Grep - search tool

    • / - search in current file
    • ctrl + f ~ global search
  • Colorscheme pack

    • colorscheme nameofcolorscheme ~ change the colorscheme from .vimrc
    • :colorscheme molokai ~ inside vim
    • colors
    • Tomorrow-Night ~ current color
  • Endwise

  • Surround

    • insert mode
      • ctrl + s + = ~ <%= %>
      • ctrl + s + - ~ <% -%>
  • Rails

    • gf ~ open file under cursor, :help rails-gf ~ details
    • :AV ~ jump to an "alternate" file (test), :help rails-alternate-related ~ details
    • :RV ~ jump to "related" file (migration)
    • :2,3Extract post ~ create a post partial from 2,3 lines
    • :[range]Extract {helper} ~ create a {name} helper from [range] lines (default:current line)
    • :[range]Extract {concern} ~ create a {name} concern from [range] lines (default: current line)
    • :Preview [path] ~ open the given path for the current app in a browser
    • :Rails console ~ call rails console
    • :Generate controller Blog ~ generates a blog controller
    • :Rails ~ run the current test, spec, or feature
    • manual OR :help rails.txt
  • CoffeeScript support

  • Haml

  • Slim

  • Pug (formerly Jade)

  • Auto-pairs

  • Commentary

    • \\ ~ toggle comments
  • Tabular

  • Taglist

    • :help taglist ~ more information
  • Fuzzy finder

    • :CtrlP or :CtrlP [starting-directory] ~ invoke ctrlp in find file mode
  • Commands

    • ctrl+s ~ save file
    • alt+down ~ move line down
    • alt+up ~ move line up
    • ctrl+o ~ previous file
    • ctrl+i ~ back to last opened file
  • Brief help

    • PluginList ~ lists configured plugins
    • PluginInstall ~ installs plugins; Append ! to update or just PluginUpdate
    • PluginSearch ~ searches plugin; Append ! to refresh local cache
    • PluginClean ~ confirms removal of unused plugins; Append ! to auto-approve removal
    • :h PlaginName ~ more details about plugin

Help 🔦

About

Text Editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published