blob: b91ea166f424fbe7eab2c008945b7b807c37c3a1 (
plain)
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
|
" ~/.vim/ftplugin/typescript/typescript.vim
" TypeScript-specific vim configuration
" ALE
let b:ale_linters = ['eslint']
" Tabs are expanded to 4 spaces
setlocal tabstop=4 shiftwidth=4 expandtab
" Show existing tabs (they can be deleted with :retab)
setlocal list
" Column marker: 110 characters
call matchadd('ColorColumn', '\%111v', 100)
setlocal textwidth=110
" Mappings
let mapleader = " "
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/typescript/typescript.vim<CR>
nnoremap <buffer> <leader>s :silent !~/scripts/tmux/tmux-npmStart.sh<CR>
nnoremap <buffer> <leader>S :silent !~/scripts/tmux/tmux-npmStart.sh -r<CR>
let mapleader = ","
inoremap <buffer> <leader>if if (<+++>) {<CR><++><CR>} <++><Esc>?<+++><CR>cf>
inoremap <buffer> <leader>else else {<CR><+++><CR>}<CR><++><Esc>?<+++><CR>cf>
|