Skip to content

Commit

Permalink
Merge pull request #11 from reilg/update-mappings
Browse files Browse the repository at this point in the history
Updated some ALE mapping
  • Loading branch information
reilg authored Sep 30, 2022
2 parents ee5ff38 + 873719d commit e0b98ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .aliasrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ alias gdf='git difftool'
alias gpr='git pull --rebase'
alias gf='git fetch'
alias gs='git status'
alias gc='git commit'

# Add alias for typo of mkdir
alias mkdit='mkdir'
Expand Down
10 changes: 10 additions & 0 deletions .vimrc.d/plugins/ale.vim
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
" some linter aliases
let g:ale_linter_aliases = {}
let g:ale_linter_aliases['vue'] = ['javascript', 'vue'] " run both js and vue linters for vue files

" setup our linters
let g:ale_linters = {}
let g:ale_linters['javascript'] = ['eslint']
let g:ale_linters['vue'] = ['eslint']
let g:ale_linters['php'] = ['php', 'phpcs']


" setup our fixers
let g:ale_fixers = {}
let g:ale_fixers['javascript'] = ['prettier', 'eslint']
let g:ale_fixers['vue'] = ['prettier', 'eslint']
let g:ale_fixers['json'] = ['prettier']
let g:ale_fixers['php'] = ['phpcbf']

" let g:ale_lint_on_save = 1
" let g:ale_fix_on_save = 1
let g:ale_javascript_prettier_options = '--no-semi --single-quote'
let g:ale_lint_on_enter = 0

" disable linters by default
let g:ale_linters_explicit = 1

nmap <silent> <leader>a <Plug>(ale_next_wrap)
nmap <silent> <leader>f <Plug>(ale_fix)
nmap <silent> <leader>d <Plug>(ale_lint)
4 changes: 2 additions & 2 deletions .vimrc.d/plugins/easy-align.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
" Start interactive EasyAlign in visual mode (e.g. vipga)
" start interactive easyalign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
" start interactive easyalign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)

0 comments on commit e0b98ef

Please sign in to comment.