-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
143 lines (113 loc) · 3.09 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
" Jason Wells .vimrc
" http://flipstock.net
" no vi compatibility
set nocompatible
" Vim unix swap directory
set directory=~/.vim/swap
" Load Plugins with https://github.com/junegunn/vim-plug
call plug#begin('~/.vim/plugged')
Plug 'altercation/vim-colors-solarized'
Plug 'tomtom/tlib_vim'
Plug 'marcweber/vim-addon-mw-utils'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-markdown'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-characterize'
Plug 'tpope/vim-haml'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-bundler'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-jdaddy'
" Plug 'xolox/vim-easytags'
Plug 'xolox/vim-misc'
Plug 'vim-airline/vim-airline'
Plug 'burnettk/vim-angular'
Plug 'pangloss/vim-javascript'
Plug 'othree/javascript-libraries-syntax.vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'JamshedVesuna/vim-markdown-preview'
Plug 'leafgarland/typescript-vim'
Plug 'fatih/vim-go'
Plug 'prettier/vim-prettier', { 'do': 'yarn install --frozen-lockfile --production' }
Plug 'mxw/vim-jsx'
Plug 'github/copilot.vim'
call plug#end()
" Line numbers
set number
" Show column and line
set ruler
" Syntax highlighting and filetype plugin specific
syntax on
filetype plugin on
filetype indent on
" Always show bookmarks in file browser
let NERDTreeShowBookmarks=1
" gvim specific settings
if has("gui_running")
set background=dark
colorscheme solarized
" different mac vs windows gui preferences
if has("gui_macvim")
let macvim_hig_shift_movement = 1 " highlight with shift
set gfn=Inconsolata:h16
set lines=999 columns=150
else
set gfn=Inconsolata:h11
set lines=75 columns=115
endif
" Better indenting on line breaks
set breakindent
endif
" Tabs
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
nohlsearch " we don't want to see highlights at first
" Backups
set nobackup
" Wrap long lines at a word break instead of some random character location
set linebreak
set display=lastline
" Encoding
set encoding=utf-8
" No line folding
set nofoldenable
" Allow backspacing over everything in insert mode
set backspace=indent,eol,start
" Switch from an unsaved buffer without saving it first
set hidden
" If unsaved changes, ask if you want to save
set confirm
" ttyfast
set ttyfast
" Filetype specific settings
autocmd Filetype python setlocal ts=4 sts=4 sw=4
" airline
set laststatus=2
" Ctrl-P tags
nnoremap <leader>t :CtrlPTag<CR>
set wildignore+=*/node_modules/*,*/bower_components/*,tmp/*,typings/*
autocmd BufReadPre *.js let b:javascript_lib_use_angularjs = 1
" Extended bracket matching
runtime macros/matchit.vim
let vim_markdown_preview_hotkey='<C-m>'
" Map json pretty print
map <C-j> gqaj
" Auto and smart indenting
set autoindent
set smartindent
" Prettier formatting
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
" Snippet Change
let g:snipMate = { 'snippet_version' : 1 }