Skip to content

Instantly share code, notes, and snippets.

@oxUnd
Last active July 3, 2022 04:29
Show Gist options
  • Save oxUnd/ded07ba534aa5b424fbd to your computer and use it in GitHub Desktop.
Save oxUnd/ded07ba534aa5b424fbd to your computer and use it in GitHub Desktop.
.vimrc
call plug#begin()
" Make sure you use single quotes
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/vim-easy-align'
" Group dependencies, vim-snippets depends on ultisnips
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using git URL
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
Plug 'https://github.com/leafgarland/typescript-vim.git'
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }
Plug 'junegunn/goyo.vim'
Plug 'bling/vim-airline'
Plug 'kien/ctrlp.vim'
" Plug 'https://github.com/Valloric/YouCompleteMe.git'
" Plug 'ervandew/supertab'
Plug 'mbbill/undotree'
Plug 'vim-scripts/gdbmgr'
Plug 'tpope/vim-sensible'
Plug 'rizzatti/dash.vim'
Plug 'majutsushi/tagbar'
Plug 'peterhoeg/vim-qml'
Plug 'rizzatti/dash.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'vim-scripts/cscope.vim'
" Unmanaged plugin (manually installed and updated)
call plug#end()
" color
if 1
" Unified color scheme (default: dark)
let g:seoul256_background = 233
colo seoul256
" Light color scheme
" Switch
set background=dark
endif
if 1
let mapleader = ','
nnoremap <LEADER>w :w<ENTER>
nnoremap <LEADER>q :q<ENTER>
endif
" tab
if 1
" tab to space and size=4
set tabstop=4 shiftwidth=4 expandtab
endif
" buffer
if 1
" Move
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
set splitbelow
set splitright
endif
if has("gui_running")
set guioptions-=T
set guioptions-=e
set guitablabel=%M\ %t
set guifont=Source\ Code\ Pro:h13
endif
"==================================
set hlsearch
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
set completeopt-=preview
"==================================
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
if has("cscope")
nnoremap <leader>fa :call cscope#findInteractive(expand('<cword>'))<CR>
nnoremap <leader>l :call ToggleLocationList()<CR>
" s: Find this C symbol
nnoremap <leader>fs :call cscope#find('s', expand('<cword>'))<CR>
" g: Find this definition
nnoremap <leader>fg :call cscope#find('g', expand('<cword>'))<CR>
" d: Find functions called by this function
nnoremap <leader>fd :call cscope#find('d', expand('<cword>'))<CR>
" c: Find functions calling this function
nnoremap <leader>fc :call cscope#find('c', expand('<cword>'))<CR>
" t: Find this text string
nnoremap <leader>ft :call cscope#find('t', expand('<cword>'))<CR>
" e: Find this egrep pattern
nnoremap <leader>fe :call cscope#find('e', expand('<cword>'))<CR>
" f: Find this file
nnoremap <leader>ff :call cscope#find('f', expand('<cword>'))<CR>
" i: Find files #including this file
nnoremap <leader>fi :call cscope#find('i', expand('<cword>'))<CR>
endif
if 1
nnoremap <C-]> :only<bar>vsplit<CR>:execute "tag " . expand('<cword>')<CR>
set tags=./tags,tags;
endif
@oxUnd
Copy link
Author

oxUnd commented Oct 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment