Skip to content

mishaszu/vim-rc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mishaszu VIM configuration

Configuration is made mainly for:

  • Front-End Development (with Javascript, Typescript and ReasonML)
  • Rust Development

Font for windows

Windows uses ProggyCleatTT NF, it's only font I found work with Powerline and vim so far.

List of content

Installation

  1. Installation command for:
    • move vimrc file to main directory
    • create .vim folder
    • install vim-plug
sh ./install.sh
  1. Set System Variables look here

  2. Plugins Installation

vim -c PlugInstall

Update

  1. Update command for
    • backup old vimrc file
    • move vimrc file to $HOME directory as .vimrc
sh ./update.sh
  1. Install new plugins (if there are some new)
vim -c PlugInstall
  1. Update plugins
vim -c PlugUpdate

Rust setup with YouCompleteMe and ALE

  1. Install Rust with rustup
  2. Install nightly build
rustup toolchain add nightly
  1. Install racer:
cargo +nightly install racer
  1. Add RUST_SRC_PATH variable
export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
  1. Vim-Plug should run installation with racer completer if not:
  2. Run YCM installation with Rust parameter manually
./install.py --racer-completer
  1. Add RACER_SRC_PATH
export RACER_SRC_PATH=$HOME/.cargo/bin/racer
  1. Add rust-src
rustup component add rust-src
  1. Add rustfmt
rustup component add rustfmt
  1. For Rust errors and warnings vim needs ALE plugin
  2. For completion details as function interface use vim-racer plugin with in insert mode.

ReasonML language server setup

  1. Get Language server:
    1. Instruction website
    2. Download website
    3. Place reason-language-server.exe in your dedicated directory (yes it's .exe even for macos and linux)
    4. Set $REASONSERVER system variable with path to server
  2. Get Client (installed via Vim-plug)

System variables

  1. $REASONSERVER - path to reason-language-server file
  2. $NERDTREE_WIDTH - NERDTree width
  3. $RUST_SRC_PATH - path to Rust lib
  4. $RACER_SRC_PATH - path to Racer executable

Useful vim commands

Legend

  • <leader> = "\"
  • <C-(some key)> = C stands for ctrl

System

  1. print system variables
    • :echo $
    • press: ctrl + d

Keybindings

  1. switch to next NERDTree tab
    • ctrl + l
  2. switch to previous NERDTree tab
    • ctrl + h
  3. toggle NERDTree
    • ctrl + n
  4. focus NERDTree (unfortunately it's resizing split windows)
    • ctrl + f
  5. split window vertically
    • ctrl + a

Syntax

  • comment text selected in visual mode
    • <leader>cc
  • comment current or selected line text with single comment
    • <leader>c<space>
  • switch surroundings
    • cs<from><to>
    • for example cs'" = from ' to "
  • delete surroundings
    • ds<from>
  • surround text under cursor
    • ysiw<to>
    • opening brackets will add spacing
    • closing brackets won't add spacing
  • surround text selected in visual mode
    • S<to>
  • run prettier
    • <leader>p

Update Coc:

:CocUpdate

About

.vimrc custom file configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published