Skip to content

Commit baeddfe

Browse files
committed
fix: Clean mappings and plugins
1 parent f858a50 commit baeddfe

File tree

4 files changed

+66
-42
lines changed

4 files changed

+66
-42
lines changed

mapping.vim

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ noremap <Space> <PageDown>
2020
tnoremap <C-g> <C-\><C-n>
2121
2222
" ----------------------------------------------------------------------------
23-
" Plugin pre-configuration for bepotimist
23+
" Plugin pre-configuration for bepoptimist
2424
" It needs to be in the main configuration because of loading priorities
2525
" ----------------------------------------------------------------------------
2626
let g:surround_no_mappings = 1
@@ -88,44 +88,43 @@ inoremap <expr> <c-x><c-l> fzf#vim#complete(fzf#wrap({
8888
\ 'reducer': { lines -> join(split(lines[0], ':\zs')[2:], '') }}))
8989
9090

91-
" Executing
91+
" Executing (mostly leader key)
9292
" -----------------------------------------------------------------------------
93+
command! DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
94+
\ | wincmd p | diffthis
9395

94-
nmap <leader>p <Nop>
95-
nmap <leader>s <Nop>
9696
" ALE
97-
nmap <leader>af <Plug>(ale_fix)
9897
nmap <leader>ad <Plug>(ale_detail)
99-
" Bexec
100-
vmap <leader>x :call bexec#Visual()<CR>
101-
nmap <leader>x :call bexec#Normal()<CR>
102-
nmap <leader>l :call bexec#Live()<CR>
103-
nmap <leader>pi :PlugInstall<CR>
104-
nmap <leader>pu :PlugUpdate<CR>
105-
nmap <leader>pU :PlugUpgrade<CR>
106-
nmap <leader>pc :PlugClean<CR>
107-
nmap <leader>ps :PlugStatus<CR>
108-
nmap <leader>pd :PlugDiff<CR>
109-
nmap <leader>pI :w<CR>:source ~/.config/nvim/init.vim<CR>:PlugInstall<CR>
110-
nmap <leader>m :make<CR>
111-
nmap <leader>tt :!tox<CR>
112-
nmap <leader>tp :!pytest<CR>
98+
nmap <leader>af <Plug>(ale_fix)
11399
" css colors insert/convert via plugins
114-
nmap <leader>ch :VCoolor<CR>
115-
nmap <leader>cr :VCoolIns r<CR>
100+
nmap <leader>cA :ConvertColorTo rgba<CR>
116101
nmap <leader>ca :VCoolIns ra<CR>
117102
nmap <leader>cH :ConvertColorTo hex<CR>
103+
nmap <leader>ch :VCoolor<CR>
118104
nmap <leader>cR :ConvertColorTo rgb<CR>
119-
nmap <leader>cA :ConvertColorTo rgba<CR>
105+
nmap <leader>cr :VCoolIns r<CR>
106+
nnoremap <leader>do :DiffOrig<CR>
120107
" Order all css properties
121108
nnoremap <leader>cs :<C-u>g/{/ .+1,/}/-1 sort<CR>
122-
123-
command! DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
124-
\ | wincmd p | diffthis
125-
nnoremap <leader>do :DiffOrig<CR>
109+
nmap <leader>f :Prettier<CR>
110+
nmap <leader>m :make<CR>
111+
nmap <leader>pc :PlugClean<CR>
112+
nmap <leader>pd :PlugDiff<CR>
113+
nmap <leader>pi :PlugInstall<CR>
114+
nmap <leader>pI :w<CR>:source ~/.config/nvim/init.vim<CR>:PlugInstall<CR>
115+
nmap <leader>p <Nop>
116+
nmap <leader>ps :PlugStatus<CR>
117+
nmap <leader>pu :PlugUpdate<CR>
118+
nmap <leader>pU :PlugUpgrade<CR>
119+
nmap <leader>s <Nop>
120+
nmap <leader>tp :!pytest<CR>
121+
nmap <leader>tt :!tox<CR>
122+
" Bexec
123+
nmap <leader>X :call bexec#Live()<CR>
124+
nmap <leader>x :call bexec#Normal()<CR>
125+
vmap <leader>x :call bexec#Visual()<CR>
126126
" Clean dirty white space (EOL)
127127
nnoremap <leader><space> :silent! %s/\s\+$//<CR>
128-
129128
" Forgotten unbreakable spaces… for French only
130129
" TODO: operator cleaner?
131130
nnoremap <leader>  :%s/\(\S\) \([:;?!]\)/\1 \2/g<CR>
@@ -136,7 +135,6 @@ nnoremap <leader>  :%s/\(\S\) \([:;?!]\)/\1 \2/g<CR>
136135
" vim-bookmarks
137136
nnoremap ms <Plug>BookmarkShowAll
138137
139-
140138
" Experiment
141139
" Repeat on all selected lines
142140
vmap . :normal .

plugin.default.vim

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ let g:python3_host_prog=expand('~/.virtualenvs/neovim3/bin/python')
1313
let g:user_emmet_install_global = 0
1414

1515
" ALE
16-
let g:ale_fixers = ['prettier', 'stylelint', 'eslint', 'autopep8', 'yapf',
17-
\ 'remove_trailing_lines', 'trim_whitespace' ]
18-
let b:ale_warn_about_trailing_whitespace = 0
16+
let g:ale_fixers = {
17+
\ '*': ['remove_trailing_lines', 'trim_whitespace', 'stylelint'],
18+
\ 'python': ['autopep8', 'yapf'],
19+
\ 'javascript': ['eslint'],
20+
\ 'vue': ['eslint']
21+
\}
22+
let g:ale_warn_about_trailing_whitespace = 0
23+
let g:ale_linters = {
24+
\ '*': ['eslint']
25+
\ }
1926

2027
" vim-rooter
2128
let g:rooter_patterns = ['Rakefile', '.git/', 'package.json', '.projectroot']
@@ -194,3 +201,11 @@ let g:vcoolor_disable_mappings = 1
194201
" thesaurus_query
195202
" undocumented option to remove mappings
196203
let g:tq_map_keys = 0
204+
205+
" prettier
206+
let g:prettier#exec_cmd_async = 1
207+
let g:prettier#quickfix_enabled = 0
208+
let g:prettier#quickfix_auto_focus = 0
209+
let g:prettier#autoformat = 0
210+
"let g:prettier#config#semi = 'false'
211+
let g:prettier#config#config_precedence = 'file-override'

plugin.denite.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ endfunction
3939
let s:denite_options = {
4040
\ 'prompt' : '',
4141
\ 'start_filter': 1,
42+
\ 'split': 'floating',
4243
\ 'winheight': 11,
4344
\ 'source_names': 'short',
4445
\ 'direction': 'botright',

plugin.vim

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,34 @@
55
" ----------------------------------------------------------------------------
66
" Disabled plugins
77
" ----------------------------------------------------------------------------
8-
" Plug 'bfredl/nvim-ipy'
9-
" Plug 'plytophogy/vim-virtualenv'
10-
" Plug 'kana/vim-operator-user' " Grammarous dep
11-
" Plug 'kristijanhusak/deoplete-phpactor', { 'for': 'php' }
12-
" Plug 'AndrewRadev/sideways.vim' " Moving arguments and attributes
138
" Plug 'airblade/vim-rooter' " Auto cd to project dir
14-
" Plug 'jaxbot/browserlink.vim', { 'for': ['html', 'css', 'js', 'sass', 'scss'] }
159

1610
" ----------------------------------------------------------------------------
1711
" Under testing …
1812
" ----------------------------------------------------------------------------
1913
Plug 'chrisbra/csv.vim'
2014
Plug 'SidOfc/mkdx' " Markdown goodies
2115

16+
Plug 'prettier/vim-prettier', {
17+
\ 'do': 'npm install',
18+
\ 'branch': 'release/1.x',
19+
\ 'for': [
20+
\ 'javascript',
21+
\ 'typescript',
22+
\ 'css',
23+
\ 'less',
24+
\ 'scss',
25+
\ 'json',
26+
\ 'graphql',
27+
\ 'markdown',
28+
\ 'vue',
29+
\ 'lua',
30+
\ 'php',
31+
\ 'python',
32+
\ 'ruby',
33+
\ 'html',
34+
\ 'swift' ] }
35+
2236
" ----------------------------------------------------------------------------
2337
" My custom plugins
2438
" ----------------------------------------------------------------------------
@@ -40,7 +54,6 @@ Plug 'vim-airline/vim-airline-themes' " Airline themes
4054
" ----------------------------------------------------------------------------
4155
" Shougo plugin suite
4256
" ----------------------------------------------------------------------------
43-
"Plug 'Shougo/denite.nvim', { 'tag': '2.1' }
4457
Plug 'Shougo/denite.nvim'
4558
if has('nvim')
4659
Plug 'Shougo/deoplete.nvim',
@@ -56,7 +69,6 @@ Plug 'Shougo/neosnippet'
5669
Plug 'Shougo/neosnippet-snippets'
5770

5871
" Extra sources
59-
Plug 'kmnk/denite-dirmark'
6072
Plug 'pocari/vim-denite-emoji'
6173
Plug 'deoplete-plugins/deoplete-zsh'
6274
Plug 'wokalski/autocomplete-flow', { 'for': 'js' }
@@ -66,7 +78,6 @@ Plug 'zchee/deoplete-jedi', { 'for': 'python' }
6678
" ----------------------------------------------------------------------------
6779
" All languages plugins
6880
" ----------------------------------------------------------------------------
69-
Plug 'tpope/vim-obsession' " Actually usable session system
7081
Plug 'tpope/vim-fugitive' " Git integration
7182
Plug 'tpope/vim-surround' " Motions around words
7283
Plug 'tpope/vim-repeat' " Missing repeat with dot
@@ -77,14 +88,12 @@ Plug 'tpope/vim-sleuth' " Detect tab settings
7788
Plug 'Ron89/thesaurus_query.vim' " Synonyms
7889
Plug 'junegunn/fzf.vim' " fuzzy find wrapper
7990
Plug 'mhinz/vim-startify' " Startup screen
80-
Plug 'terryma/vim-multiple-cursors' " Multi-selection (c-n)
8191
Plug 'MattesGroeger/vim-bookmarks' " Annotations
8292
Plug 'ludovicchabant/vim-gutentags' " Ctags generation
8393
Plug 'justinmk/vim-sneak' " Multiline f/F/t/T
8494
Plug 'wellle/targets.vim' " Additionnal text objects: cin) or da,…
8595
Plug 'bkad/CamelCaseMotion' " Additionnal CamelCase motions
8696
Plug 'michaeljsmith/vim-indent-object' " Indentation text objects
87-
Plug 'jeetsukumaran/vim-indentwise' " Motion for indentations
8897
Plug 'jeetsukumaran/vim-pythonsense' " Additionnal python text-objects
8998
Plug 'PeterRincker/vim-argumentative' " Switch arguments
9099
Plug 'junegunn/goyo.vim' " Minimalist interface on demand
@@ -101,6 +110,7 @@ Plug 'francoiscabrol/ranger.vim' " Ranger integration
101110
Plug 'aperezdc/vim-template' " Auto-template when opening new file
102111
Plug 'sheoak/vim-snippets' " Snippets for different languages
103112
Plug 'diepm/vim-rest-console' " Call REST API from vim
113+
Plug 'kana/vim-operator-user' " Grammarous dep
104114
Plug 'rhysd/vim-grammarous' " Grammar check
105115
Plug 'osyo-manga/vim-over' " Live matching on command line
106116

0 commit comments

Comments
 (0)