Skip to content

SammyLin/nvimrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To install neovim the latest release:


brew install python
pip install neovim --user

brew install python3
pip3 install neovim --user

brew install neovim/neovim/neovim

Clone nvimrc

git clone [email protected]:SammyLin/nvimrc.git ~/.sammylin-nvimrc
mkdir -p ~/.config
ln -s ~/.sammylin-nvimrc ~/.config/nvim

Enter nvim Install Plugin

:PlugInstall

" and Install Golang dependency
:GoInstallBinaries

Install ag & ctags

brew install the_silver_searcher
brew install ctags

Install python

brew install py

What fonts in my vim ?

Install Fonts include powerline

git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh

What plugins are included?

  • ag.vim: 可以搜尋文件內容,用 C 寫的,可以用 regex 來找,比 Ack 快更多
  • emmet-vim: 寫 HTML 方便產生 code
  • matchit.zip: extended % matching for HTML, LaTeX, and many other languages : 按 % 可以跳到前後的 tag
  • NERD Tree: A tree explorer plugin for vim
  • vim-nerdtree-tabs: NERDTree and tabs together in Vim, painlessly - NERDTree 跟 tabs 可以在一起
  • vim-airline: lean & mean status/tabline for vim that's light as air - 狀態列的好幫手
  • vim-airline-themes: A collection of themes for vim-airline
  • editorconfig-vim: EditorConfig plugin for Vim http://editorconfig.org
  • ctrlp.vim: Fuzzy file, buffer, mru and tag finder. In my config it's mapped to <Ctrl+F>, because <Ctrl+P> is used by YankRing
  • mru.vim: Plugin to manage Most Recently Used (MRU) files
  • supertab: Perform all your vim insert mode completions with Tab
  • TComment: 快速加上註解
  • tlib_vim: Some utility functions for VIM
  • vim-addon-mw-utils: interpret a file by function and cache file automatically
  • vim-fugitive: a Git wrapper so awesome, it should be illegal
  • vim-gitgutter: A Vim plugin which shows a git diff in the gutter (sign column) - 可以馬上 git diff 的狀態
  • vim-indent-object: Vim plugin that defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts, etc.
    • v + i + i : 可以選取同層級的文字
    • v + a + i : 可連同上層級的文字也一起
  • vim-smartinput: Vim plugin: Provide smart input assistant - 可自動補括號,例:(按( 會自動補 ))
  • UltiSnips: The ultimate snippet solution for Vim. (snipmate的替代)
  • vim-snippets: vim-snipmate default snippets (Previsouly snipmate-snippets) - 程式模組庫
  • tagbar: Vim plugin that displays tags in a window, ordered by scope : 把程式碼按 method 或 class 整理成 list 顯示出來。
  • vim-endwise: endwise.vim: wisely add "end" in ruby, endfunction/endif/more in vim script - 幫你在後面加 end
  • vim-chef: Vim plugins for chef
  • surround: 處理程式語言常常用到成對的符號,如括號等。
  • YouCompleteMe: A code-completion engine for Vim - 自動補完工具
  • vim-better-whitespace: Better whitespace highlighting for Vim - 存檔後自動移除多餘的空白鍵

Golang Development

  • fatih/vim-go: Go development plugin for Vim
  • gocode : An autocompletion daemon for the Go programming language

Ruby on Rails Development

What modes are included?

Key Mapping

Open/Close NERDTree

map <Leader>n <plug>NERDTreeTabsToggle<CR>

Open directory of current opened file

map <Leader>r :NERDTreeFind<CR>

Display the MRU file list

map <Leader>f :MRU<CR>

Display CtrlPBuffer

map <Leader>b :CtrlPBuffer<CR>

My Frequently Command

Open/Close NERDTree

<space>n

Open CtrlP

Control + p
or
<space>o

Open Tagbar

<F6>

Display the MRU file list

<space>f

Display CtrlP CtrlPBuffer

<space>b

previous buffer

Control + h

next buffer

Control + l

To suspend your running vim

Control + z

# will suspend the process and get back to your shell

$ fg

Toggle comment

Control + / Control + /

Finding a word

<!-- /<word> -->

or

?<word>

# Pressing the n key, will allow you to go directly to the next occurrence of the word.

Ag (Finding a word in directory)

FF

Rspec

# :call RunCurrentSpecFile
<space>t

# :call RunNearestSpec
<space>s

# :call RunLastSpec
<space>l

# :call RunAllSpecs
<space>a

Open Github

vi ~/.gitconfig

[alias]
    url =! bash -c 'git config --get remote.origin.url | sed -E "s/.+:\\(.+\\)\\.git$/https:\\\\/\\\\/github\\\\.com\\\\/\\\\1/g"'
,o

Reference document

Reference vimrc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published