• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision4fd77a6a14f6f5d006403084b91898ce6c20384a (tree)
l'heure2022-03-30 14:17:59
Auteurbadcoff33 <none@none>
Commiterbadcoff33

Message de Log

update

Change Summary

Modification

--- a/after/ftplugin/c.vim
+++ b/after/ftplugin/c.vim
@@ -7,14 +7,14 @@ let g:c_show_list_chars = get(g:, 'c_show_list_chars', 1)
77
88 " iabbrev did not work when 'cpoptions' has '>'
99 if match(&cpoptions, '>') < 0
10-iabbrev <buffer> xswitch switch ()<Left><C-f>
11-iabbrev <buffer> xcase case :<C-f><CR>break;<CR><Up><Up><End><Left>
12-iabbrev <buffer> xop {<C-f><CR><CR>}<CR><Up><Up><C-f>
13-iabbrev <buffer> xif if ()<Left><C-f>
14-iabbrev <buffer> xelse else<C-f><CR>{<C-f><CR><CR>}<CR><Up><Up><C-f>
15-iabbrev <buffer> xinc #include ".h"<Left><Left><Left>
16-iabbrev <buffer> xdef #define
17-iabbrev <buffer> xdbg #warning DEBUG CODE:
10+iabbrev <buffer> _switch switch ()<Left><C-f>
11+iabbrev <buffer> _case case :<C-f><CR>break;<CR><Up><Up><End><Left>
12+iabbrev <buffer> _op {<C-f><CR><CR>}<CR><Up><Up><C-f>
13+iabbrev <buffer> _if if ()<Left><C-f>
14+iabbrev <buffer> _else else<C-f><CR>{<C-f><CR><CR>}<CR><Up><Up><C-f>
15+iabbrev <buffer> _inc #include ".h"<Left><Left><Left>
16+iabbrev <buffer> _def #define
17+iabbrev <buffer> _dbg #warning DEBUG CODE:
1818 endif
1919
2020 " quick preview of tags
--- a/after/ftplugin/markdown.vim
+++ b/after/ftplugin/markdown.vim
@@ -56,9 +56,9 @@ if match(&cpoptions, '>') >= 0
5656 finish
5757 endif
5858
59-iabbrev <buffer> xlink []()<Esc>2hi
60-iabbrev <buffer> xdate <C-r>=strftime("%Y-%m-%d")<CR>
61-iabbrev <buffer> xpy ``` python<CR><CR>```<Up>
59+iabbrev <buffer> _link []()<Esc>2hi
60+iabbrev <buffer> _date <C-r>=strftime("%Y-%m-%d")<CR>
61+iabbrev <buffer> _py ``` python<CR><CR>```<Up>
6262
6363 function! s:ToggleTodo()
6464 let stop_at_line = search('^\s*$','nbW')
--- a/after/ftplugin/rst.vim
+++ b/after/ftplugin/rst.vim
@@ -18,7 +18,7 @@ nnoremap <buffer> <LocalLeader>h4 0v$beyo<Esc>PVr^}
1818 nnoremap <buffer> <LocalLeader>x :call gtd#ToggleTodo()<CR>
1919
2020 " be up to date
21-iabbrev <buffer> xdate <C-r>=strftime("%Y-%m-%d")<CR>
22-iabbrev <buffer> xtodo *TODO*
23-iabbrev <buffer> xlink `NAME <>`_<Esc>2bea
21+iabbrev <buffer> _date <C-r>=strftime("%Y-%m-%d")<CR>
22+iabbrev <buffer> _todo *TODO*
23+iabbrev <buffer> _link `NAME <>`_<Esc>2bea
2424
--- a/after/ftplugin/txt.vim
+++ b/after/ftplugin/txt.vim
@@ -9,6 +9,6 @@ setlocal formatoptions-=atc
99 nnoremap <buffer> <LocalLeader>x :call gtd#ToggleTodo()<CR>
1010
1111 " be up to date
12-iabbrev <buffer> xdate <C-r>=strftime("%Y-%m-%d")<CR>
13-iabbrev <buffer> xtodo *TODO*
12+iabbrev <buffer> _date <C-r>=strftime("%Y-%m-%d")<CR>
13+iabbrev <buffer> _todo *TODO*
1414
--- a/autoload/lib/popup.vim
+++ b/autoload/lib/popup.vim
@@ -1,3 +1,16 @@
1+function! lib#popup#top_left(text)
2+ return popup_create(a:text, #{
3+ \ pos: "topleft",
4+ \ line: 1,
5+ \ col: 1,
6+ \ time: 2500,
7+ \ tabpage: -1,
8+ \ highlight: 'PmenuSel',
9+ \ padding: [1,1,1,1],
10+ \ maxwidth: (&columns * 2) / 3
11+ \ })
12+endfunction
13+
114 function! lib#popup#top_right(text)
215 return popup_create(a:text, #{
316 \ pos: "topright",
--- a/autoload/run.vim
+++ b/autoload/run.vim
@@ -16,8 +16,11 @@ function! run#close(ch)
1616 unlet g:run_ani_winid
1717 let dict_name = GetJobDictName(a:ch)
1818 execute 'call setqflist([], "r", ' dict_name ')'
19+ if !empty(getqflist())
20+ clast
21+ endif
1922 let text = "job done: "..eval(dict_name..'["title"]')
20- let winid = lib#popup#top_right(text)
23+ let winid = lib#popup#top_left(text)
2124 call setwinvar(winid, "&wrap", 0)
2225 endfunction
2326
@@ -59,10 +62,10 @@ function! run#run(dict)
5962 let d=#{title: a:dict["cmd"], lines: [], efm: regexp}
6063 execute "let "..GetJobDictName(j).."= copy(d)"
6164 if ( job_status(j) == "run" ) && !exists("g:run_ani_winid") && ( !exists('a:dict.hidden') || (a:dict.hidden == 0) )
62- let g:run_tid = timer_start(500, function("run#alive"), #{repeat: -1})
65+ let g:run_tid = timer_start(200, function("run#alive"), #{repeat: -1})
6366 let g:run_ani_index = 0
6467 let g:run_ani_winid = popup_create(s:run_ani_string[0], #{
65- \ line: &lines - 1,
68+ \ line: 1,
6669 \ col: 1,
6770 \ tabpage: -1,
6871 \ highlight: 'PmenuSel',
--- a/gvimrc
+++ b/gvimrc
@@ -5,14 +5,15 @@ nnoremap <expr> <leader>h11 ':set guifont='..FontFamily()..':h11<CR>'
55 nnoremap <expr> <leader>h10 ':set guifont='..FontFamily()..':h10<CR>'
66 nnoremap <expr> <leader>h9 ':set guifont='..FontFamily()..':h9<CR>'
77
8-set guifont=Courier_Prime:h11 linespace=2
8+"set guifont=JetBrains_Mono
9+set guifont=Courier_Prime:h11
910 set guioptions=!a
1011 set guicursor+=a:blinkon0
1112 set renderoptions=
1213 set mousemodel=popup
1314 set nomousefocus
1415 set signcolumn=yes
15-set columns=120
16+set columns=100
1617
1718 tnoremap <LeftMouse> <C-w>N
1819 tmap <RightMouse> <C-w>N<RightMouse>
--- a/plugin/run.vim
+++ b/plugin/run.vim
@@ -4,6 +4,5 @@ command! -complete=file -nargs=* Ctags call run#run({'cmd':'ctags <args>','hidde
44 command! -complete=file -nargs=* Make call run#run({'cmd':'make <args>', 'hidden':0})
55 command! -complete=file -nargs=* Rg call run#run({'cmd':'rg --vimgrep <args>', 'hidden':0, 'regexp':&grepformat})
66
7-nnoremap <leader><f7> :<C-u>Make -s<space>
8-nnoremap <f7> :<C-u>Make -s<up><cr>
9-imap <f7> <Esc><f7>,
7+nnoremap <leader>M :<C-u>Make -s<space>
8+nnoremap <leader>m :<C-u>Make -s<up><cr>
--- a/plugin/visuals.vim
+++ b/plugin/visuals.vim
@@ -1,11 +1,15 @@
11 " Vim plugin file
22
3-command! -nargs=0 HlWord call visuals#hl_word_on()
4-noremap <Leader><Leader> <cmd>HlWord<CR>
5-autocmd BufEnter * call visuals#blend_down()
6-
73 command -nargs=0 InfoHl call visuals#info_hl()
8-
4+command -nargs=0 HlWord call visuals#hl_word_on()
95 command -nargs=0 BlinkyOn :call visuals#enable_blinky()
106 command -nargs=0 BlinkyOff :call visuals#disable_blinky()
7+
8+augroup visuals
9+ au!
10+ autocmd WinNew * call visuals#blend_down()
11+augroup END
12+
13+noremap <Leader><Leader> <cmd>HlWord<CR>
14+
1115 BlinkyOn " default to ON
--- a/plugins.vim
+++ b/plugins.vim
@@ -23,9 +23,9 @@ let g:dircfg =
2323 \ 'compiler ghs'
2424 \ ],
2525 \ 'RL78_data_flash': [
26- \ 'command! -nargs=0 CtagsCommand Ctags -R main xcpbasicdrv mcur5f10agf sbcata663431 FDL_EEL_RL78_Type01/FDL/lib',
26+ \ 'command! -nargs=0 CtagsCommand Ctags -R main xcpbasicdrv mcur5f10agf sbcata663431 NvmDriver',
2727 \ 'nnoremap <C-CR> :<C-u>Rg -tc -tcmake <C-r><C-w> .',
28- \ 'set path=main,xcpbasicdrv,mcur5f10agf,sbcata663431,FDL_EEL_RL78_Type01/FDL/lib,NvmDriver,,',
28+ \ 'set path=main,xcpbasicdrv,mcur5f10agf,sbcata663431,NvmDriver,NvmDriver/**,,',
2929 \ 'set grepprg=rg\ --vimgrep\ -g\ *.[ch]\ $*',
3030 \ 'set relativenumber',
3131 \ 'compiler iar'
--- a/vimrc
+++ b/vimrc
@@ -116,10 +116,12 @@ set diffopt=internal,algorithm:minimal,context:8,vertical,iwhite,filler
116116 if &diff
117117 set columns=999 lines=999
118118 endif
119+command! DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | wincmd p | diffthis
119120
120121 " Switch to normal mode with special keys
121122 inoremap <Ins> <Esc>
122123 inoremap <k0> <Esc>
124+inoremap <C-Space> <Esc>
123125
124126 " Yank more consistent to D and dd commands
125127 nnoremap Y y$
@@ -141,10 +143,6 @@ nnoremap <S-Right> <C-w>l
141143 nnoremap <S-Left> <C-w>h
142144 nnoremap <S-Up> <C-w>k
143145 nnoremap <S-Down> <C-w>j
144-imap <S-Right> <Esc><S-Right>
145-imap <S-Left> <Esc><S-Left>
146-imap <S-Up> <Esc><S-Up>
147-imap <S-Down> <Esc><S-Down>
148146 tnoremap <S-Right> <C-\><C-n><C-w>l
149147 tnoremap <S-Left> <C-\><C-n><C-w>h
150148 tnoremap <S-Up> <C-\><C-n><C-w>k
@@ -159,12 +157,17 @@ nnoremap <A-k> <cmd>move .-2<CR>==
159157 vnoremap <A-j> :move '>+1<CR>==gv=gv
160158 vnoremap <A-k> :move '<-2<CR>==gv=gv
161159
162-nnoremap <A-+> 3<C-w>+3<C-w>>
163-nnoremap <A--> 3<C-w>-3<C-w><
164-
165160 nnoremap <A-o> :bprevious<CR>
166161 nnoremap <A-i> :bnext<CR>
167162
163+" command line
164+cnoremap <expr> <A-.> expand("%:h")..g:path_sep
165+cnoremap <expr> <A-,> $USERPROFILE..g:path_sep..'vimfiles'..g:path_sep
166+
167+" Expand abbreviations (without trailing space)
168+imap <C-CR> <C-]>
169+cmap <C-CR> <C-]>
170+
168171 nnoremap <C-j> :cnext<CR>
169172 nnoremap <C-k> :cprevious<CR>
170173 nnoremap n nzzzv
@@ -176,27 +179,22 @@ nmap <C-l> :nohlsearch<cr>:diffupdate<cr>:redraw!<cr>
176179 imap <C-l> <Esc><C-l>
177180
178181 " Type a word, press below key squence and "Enclose" `current` (word) {bang}!
179-inoremap <C-Space>" <C-o>db"<C-r>-"
180-inoremap <C-Space>' <C-o>db'<C-r>-'
181-inoremap <C-Space>` <C-o>db`<C-r>-`
182-inoremap <C-Space>) <C-o>db(<C-r>-)
183-inoremap <C-Space>] <C-o>db[<C-r>-]
184-inoremap <C-Space>} <C-o>db{<C-r>-}
182+inoremap <A-Space>" <C-o>db"<C-r>-"
183+inoremap <A-Space>' <C-o>db'<C-r>-'
184+inoremap <A-Space>` <C-o>db`<C-r>-`
185+inoremap <A-Space>) <C-o>db(<C-r>-)
186+inoremap <A-Space>] <C-o>db[<C-r>-]
187+inoremap <A-Space>} <C-o>db{<C-r>-}
185188
186189 let g:vim_home = expand('<sfile>:p:h')
187190 let g:path_sep = has('unix') ? '/' : '\'
188191
189192 """ make use of Umlaut keys
190-"set langmap=ü/,Ü?,ö],Ö[,ä},Ä{
191-set langmap=Ö\",ö:
193+set langmap=Ö\",ö:,ü{,ä},Ü[,Ä]
192194
193195 " set leader and localleader keys, that works best for me
194196 let mapleader = " "
195-let maplocalleader = "+"
196-
197-let g:ft2regex = { 'c':'\.[ch]$', 'vim':'vim', 'py':'\.py$', 'cmake':'\(\.cmake\|CMakeLists.txt\)' }
198-let LsFilter = { ft -> has_key(g:ft2regex, ft) ? g:ft2regex[ft] : ''}
199-nnoremap <expr> <Leader>b ':filter /'..LsFilter(&ft)..'/ ls<CR>'
197+let maplocalleader = "-"
200198
201199 """ quick note taking
202200 nnoremap <expr> <Leader>n ":drop "..strftime("~/Documents/Notes/note-%d-%m-%y.txt".."<CR>:setfiletype markdown<CR>")
@@ -214,18 +212,18 @@ vnoremap <Leader>r :s///gI<Left><Left><Left><Left>
214212
215213 """ quickfix
216214 nnoremap <Leader>c :clist!<CR>
217-nnoremap <Leader>q :botright copen<CR>
215+nnoremap <Leader>q :botright copen<CR>G
218216 nnoremap <Leader>Q :cclose<CR>
219217
220-""" command line
221-cnoremap <expr> <A-.> expand("%:h")..g:path_sep
222-cnoremap <expr> <A-,> $USERPROFILE..g:path_sep..'vimfiles'..g:path_sep
223-
224218 """ command line abbreviations
225-cabbrev E edit
226-cabbrev T tabedit
227-cabbrev F find
228-cabbrev J tjump
219+cabbrev e edit
220+cabbrev t tabedit
221+cabbrev f find
222+cabbrev j tjump
223+cabbrev b buffer
224+let g:ft2regex = { 'c':'\.[ch]$', 'vim':'vim', 'py':'\.py$', 'cmake':'\(\.cmake\|CMakeLists.txt\)' }
225+let LsFilter = { ft -> has_key(g:ft2regex, ft) ? g:ft2regex[ft] : ''}
226+cabbrev <expr> B 'filter /'..LsFilter(&ft)..'/ ls<CR>'
229227
230228 command! -nargs=0 IC :set ignorecase nosmartcase
231229 command! -nargs=0 CS :set noignorecase nosmartcase