Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set encoding=utf-8
- set history=3001
- set tabstop=4
- set tabstop=4
- set shiftwidth=4
- set expandtab
- " set signcolumn=no " force the signcolumn to disappear
- set signcolumn=yes " force the signcolumn to appear
- " set signcolumn=auto " return the signcolumn to the default behaviour
- syntax enable
- syntax on
- set hls
- set termguicolors
- " vundle
- filetype off
- set nocompatible
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- Plugin 'gmarik/Vundle.vim'
- Plugin 'fatih/vim-go'
- Plugin 'dracula/vim'
- Plugin 'Valloric/YouCompleteMe'
- Plugin 'zxqfl/tabnine-vim'
- Plugin 'HerringtonDarkholme/yats.vim'
- Plugin 'maxmellon/vim-jsx-pretty'
- Plugin 'prettier/vim-prettier', { 'do': 'yarn install', 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }
- " Plugin 'itchyny/lightline.vim'
- Plugin 'vim-airline/vim-airline'
- Plugin 'vim-airline/vim-airline-themes'
- Plugin 'scrooloose/nerdtree'
- Plugin 'airblade/vim-gitgutter'
- Plugin 'tpope/vim-commentary'
- call vundle#end()
- filetype plugin indent on
- set numberwidth=4
- set runtimepath+=$HOME/.vim/plugins/vim-gitgutter
- let g:gitgutter_async = 0
- let g:gitgutter_enabled = 0
- set autochdir
- let NERDTreeChDirMode=2
- au VimEnter NERD_tree_1 enew | execute 'NERDTree '.argv()[0]
- let g:jsx_ext_required = 1
- let g:jsx_pragma_required = 1
- let g:typescript_compiler_binary = 'tsc'
- let g:typescript_compiler_options = ''
- let g:airline#extensions#tabline#enabled = 1
- " lightline
- let g:lightline = {
- \ 'colorscheme': 'one',
- \ 'active': {
- \ 'left': [ [ 'mode', 'paste' ],
- \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
- \ },
- \ 'component_function': {
- \ 'gitbranch': 'fugitive#head'
- \ },
- \ }
- " set laststatus=2
- " NERDTree
- let g:NERDTreeIndicatorMapCustom = {
- \ "Modified" : "✹",
- \ "Staged" : "✚",
- \ "Untracked" : "✭",
- \ "Renamed" : "➜",
- \ "Unmerged" : "═",
- \ "Deleted" : "✖",
- \ "Dirty" : "✗",
- \ "Clean" : "✔︎",
- \ 'Ignored' : '☒',
- \ "Unknown" : "?"
- \ }
- " YouCompleteMe
- let g:ycm_use_clangd = 0
- " Prettier
- let g:prettier#autoformat = 1
- " vim-go
- let g:go_test_timeout = '30s'
- let g:go_def_mode = 'gopls'
- let g:go_fmt_command = "goimports"
- let g:go_highlight_extra_types = 1
- let g:go_highlight_functions = 1
- let g:go_highlight_function_parameters = 1
- let g:go_highlight_function_calls = 1
- let g:go_highlight_structs = 1
- let g:go_highlight_types = 1
- let g:go_highlight_fields = 1
- let g:go_highlight_operators = 1
- let g:go_highlight_build_constraints = 1
- let g:go_highlight_generate_tags = 1
- let g:go_highlight_format_strings = 1
- let g:go_highlight_variable_declarations = 1
- let g:go_highlight_variable_assignments = 1
- " Dracula 主題
- let g:dracula_colorterm = 0 " 背景
- let g:dracula_italic = 0
- colorscheme dracula
- highlight LineNr guifg=#BD93F9 guibg=#303030
- " typescript-react 自定義設定
- hi! link jsxTagName DraculaPink
- hi! link jsxAttrib DraculaGreenItalic
- hi! link jsxComponentName DraculaCyanItalic
- hi! link typescriptBOMWindowMethod Normal
- " golang 自定義設定
- hi! link goType DraculaPink
- hi! link goSignedInts DraculaPink
- hi! link goUnsignedInts DraculaPink
- hi! link goFloats DraculaPink
- hi! link goComplexes DraculaPink
- hi! link goTypeName DraculaCyanItalic
- hi! link goReceiverType DraculaCyanItalic
- hi! link goTypeConstructor DraculaCyanItalic
- " hi! link goParamType DraculaCyan
- hi! link goBuiltins DraculaCyan
- hi! link goFunctionCall DraculaCyan
- hi! link goParen DraculaCyan
- hi! link goFormatSpecifier DraculaPurple
- hi! link goVarAssign Normal
- hi! link goVarDefs Normal
- " 顯示 tab 或空白字元
- set listchars=tab:→\ ,space:\ ,extends:⟩,precedes:⟨
- set list
- set noerrorbells " No beeps
- set number " Show line numbers
- set noswapfile " Don't use swapfile
- set showcmd " Show me what I'm typing
- set nobackup " Don't create annoying backup files
- set splitright " Split vertical windows right to the current windows
- set splitbelow " Split horizontal windows below to the current windows
- set autowrite " Automatically save before :next, :make etc.
- set hidden
- set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
- set noshowmatch " Do not show matching brackets by flickering
- set noshowmode " We show the mode with airline or lightline
- set ignorecase " Search case insensitive...
- set smartcase " ... but not it begins with upper case
- set completeopt=menu,menuone
- set nocursorcolumn " speed up syntax highlighting
- set cursorline " show the focus line
- set updatetime=300
- set pumheight=10 " Completion window max size
- set conceallevel=2 " Concealed text is completely hidden
- set nowrap
- set autoread
- " Keyboard mapping
- nnoremap <C-c> "+yy
- nnoremap <C-v> "+p
- nnoremap <A-Down> :m+<CR>==
- nnoremap <A-Up> :m .-2<CR>==
- nnoremap <ESC>j :m+<CR>==
- nnoremap <ESC>k :m .-2<CR>==
- nnoremap <F2> :set nu!<CR>
- nnoremap <F4> :set list!<CR>
- nnoremap <F5> :GitGutterToggle<CR>
- nnoremap <F3> :set hlsearch!<CR>
- nnoremap <F9> :NERDTreeToggle<CR>
- nnoremap <leader>n :NERDTree .<CR>
- " Output the current syntax group
- nnoremap <f10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
- \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
- \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<cr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement