.vimrc

.vimrc

Image not Found

vimrc

" Powerline
"set rtp+=/home/pigu/.local/lib/python2.7/site-packages/powerline/bindings/vim
"set rtp+=/home/pigu/.local/lib/python2.7/site-packages/powerline/bindings/vim

"set laststatus=2
"set t_Co=256

" set ttymouse=xterm2
" enable syntax highlighting

let g:airline_theme='bubblegum'
" let g:airline_solarized_bg='dark'

" air-line
let g:airline_powerline_fonts = 1

if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=500

" Enable filetype plugins
filetype plugin on
filetype indent on


"let g:indent_guides_enable_on_vim_startup = 1

" Set to auto read when a file is changed from the outside
set autoread
"
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","

" Fast saving
nmap <Leader>w :w!<cr>
nmap <leader>q :q<cr>
nmap <leader>Q :q!<cr>

" :W sudo saves the file
" (useful for handling the permission-denied error)
command W w !sudo tee % > /dev/null

map <leader>nn :NERDTreeToggle<cr>
map <leader>nb :NERDTreeFromBookmark
map <leader>nf :NERDTreeFind<cr>

" unicode symbols
"

let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'

" airline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''

syntax on

" Vim UI
set tabpagemax=15
set showmode

map  <C-l> :tabn<CR>
map  <C-h> :tabp<CR>
map  <C-n> :tabnew<CR>

set clipboard=unnamedplus

" show line numbers
set number

" set tabs to have 4 spaces
set ts=2
" when using the >> or << commands, shift lines by 4 spaces
set shiftwidth=2


" indent when moving to the next line while writing code
set autoindent

" expand tabs into spaces
set expandtab


" show a visual line under the cursor's current line
" set cursorline
" hi cursorline guibg=#333333
" hi CursorColumn guibg=#333333

" show the matching part of the pair for [] {} and ()
set showmatch

" enable all Python syntax highlighting features
let python_highlight_all = 1

set nocompatible              " be iMproved, required
filetype off                  " required



"Powerline Setting
" set  rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim

" set laststatus=2
" set showtabline=1
" set noshowmode
set t_Co=256

" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'

" Use :RLHelp command to look up topics in help with your interest words.
" Plug 'januswel/rlhelp.vim'
" Plug 'cohama/lexima.vim'

call plug#begin('~/.vim/plugged')

" Make sure you use single quotes

Plug 'tpope/vim-sensible'
Plug 'junegunn/seoul256.vim'
Plug 'mattn/emmet-vim'

" post install (yarn install | npm install)
Plug 'prettier/vim-prettier', { 'do': 'npm install' }

" markdown
Plug 'vim-pandoc/vim-pandoc', { 'for': 'markdown' }
Plug 'vim-pandoc/vim-pandoc-syntax', { 'for': 'markdown' }

" Use :RLHelp command to look up topics in help with your interest words.
" Plug 'januswel/rlhelp.vim'
Plug 'cohama/lexima.vim'


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => nerdtree
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle'  }
" " Plug 'jistr/vim-nerdtree-tabs', { 'on':  'NERDTreeTabsToggle'  }
" " let g:nerdtree_tabs_open_on_console_startup = 1
Plug 'Xuyuanp/nerdtree-git-plugin'
" " ```vimscript
" " let g:NERDTreeIndicatorMapCustom = {
" "     \ "Modified"  : "✹",
" "     \ "Staged"    : "✚",
" "     \ "Untracked" : "✭",
" "     \ "Renamed"   : "➜",
" "     \ "Unmerged"  : "═",
" "     \ "Deleted"   : "✖",
" "     \ "Dirty"     : "✗",
" "     \ "Clean"     : "✔︎",
" "     \ "Unknown"   : "?"
" "     \ }
" "  ``````
"```

nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>

"autocmd VimEnter * NERDTree | wincmd p

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Plug 'cespare/vim-toml'

" Vim Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bling/vim-bufferline'

Plug 'lervag/vimtex'

Plug 'mustache/vim-mustache-handlebars'

Plug 'nathanaelkane/vim-indent-guides'

" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
" Plug 'junegunn/vim-easy-align'

" Any valid git URL is allowed
" Plug 'https://github.com/junegunn/vim-github-dashboard.git'

" Multiple Plug commands can be written in a single line using | separators
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'

" On-demand loading
" Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }

" Using a non-master branch
" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }

" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
" Plug 'fatih/vim-go', { 'tag': '*' }

" Plugin options
" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }

" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

" Unmanaged plugin (manually installed and updated)
" Plug '~/my-prototype-plugin'

" Initialize plugin system
call plug#end()


execute pathogen#infect()
syntax on
filetype plugin indent on


let g:vim_markdown_frontmatter = 1
let g:vim_markdown_folding_disabled = 1
comments powered by Disqus

Lainnya yang kamu suka

post-thumb

VIM

Langkah-langkah yang Harus dilakukan untuk mendapatkan Vim: install vim (proses ini pada Ubuntu, dan Turunan Linux Debian lainnya): sudo apt-get …

Baca Artikel