• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisãoc7a47fbd091d5294bef249c9c7b32abf1d5f5aee (tree)
Hora2023-01-31 03:39:39
AutorMarkus Prepens <markus.prepens@gmai...>
CommiterMarkus Prepens

Mensagem de Log

updates

Mudança Sumário

Diff

--- a/after/ftplugin/lua.vim
+++ b/after/ftplugin/lua.vim
@@ -14,6 +14,12 @@ nnoremap <buffer> K :help <C-r><C-w><CR>
1414 nnoremap <buffer> <LocalLeader>f :call FormatLua()<CR>
1515 vnoremap <buffer> <LocalLeader>f :call FormatLua()<CR>
1616
17+" abbrev for lengthy API calls
18+iabbrev xcmd vim.api.nvim_create_user_command({name}, {command}, {*opts})<C-o>T(
19+iabbrev xmap vim.api.nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts})<C-o>T(
20+iabbrev xaug gid = vim.api.nvim_create_augroup({name}, {*opts})<C-o>T(
21+iabbrev xauc vim.api.nvim_create_autocmd({name}, {*opts})<C-o>T(
22+
1723 if !executable("stylua")
1824 finish
1925 endif
--- a/init.vim
+++ b/init.vim
@@ -106,12 +106,6 @@ if &diff
106106 endif
107107 command! ShowChanges vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | wincmd p | diffthis
108108
109-" Living with QWERTZ keyboards
110-execute "set langmap+=\<Char-246>["
111-execute "set langmap+=\<Char-228>]"
112-execute "set langmap+=\<Char-214>{"
113-execute "set langmap+=\<Char-196>}"
114-
115109 " Switch to normal mode with special keys
116110 inoremap <k0> <Esc>
117111 imap <C-l> <Esc><C-l>
@@ -183,6 +177,9 @@ nnoremap <A-h> :colder<CR>
183177 nnoremap <A-l> :cnewer<CR>
184178 nnoremap <A-j> <cmd>cnext<CR>
185179 nnoremap <A-k> <cmd>cprevious<CR>
180+" Living with QWERTZ keyboards
181+nnoremap <Char-228> <cmd>cnext<CR>
182+nnoremap <Char-246> <cmd>cprevious<CR>
186183
187184 " Window movement {{{
188185 noremap <S-Right> <C-w>l
@@ -231,13 +228,13 @@ let g:ft2glob = #{ c:'*.[ch]$', vim:'*.vim', py:'*.py$', lua: '*.lua', cmake:'*c
231228 nnoremap <expr> <Leader>v ':silent vimgrep /' .. expand("<cword>") .. '/ ' .. expand("%:h") .. g:slash .. LsFilter(&ft)
232229
233230 """ :buffer, :edit and :find
231+nnoremap <Leader>d <Cmd>bdelete<CR>
234232 nnoremap <Leader>t <cmd>tab split<CR>
235233 nnoremap <Leader>e :edit<space>
236234 nnoremap <Leader>, :edit <C-r>=stdpath("config") .. g:slash<CR>
237235 nnoremap <Leader>. :edit <C-r>=expand("%:h")=="." ? ".\\" : expand("%:h") .. g:slash<CR>
238236 nnoremap <Leader>b :buffer<space>
239237 nnoremap <Leader>f :find<Space>
240-nnoremap <Leader>x <Cmd>bdelete<CR>
241238
242239 """ Call Wordnik
243240 nnoremap <silent> <Leader>W :silent !start https://www.wordnik.com/words/<C-r>=tolower(expand("<cword>"))<CR><CR>
@@ -271,7 +268,7 @@ function! s:ToggleQuickfix()
271268 endif
272269 endif
273270 endfunction
274-nnoremap <Leader>c <cmd>call <SID>ToggleQuickfix()<CR>
271+nnoremap <Char-252> <cmd>call <SID>ToggleQuickfix()<CR>
275272 nnoremap <Leader>G <cmd>clast<CR>
276273
277274 command! -nargs=0 IC :set ignorecase nosmartcase
@@ -284,12 +281,12 @@ augroup init " {{{
284281 autocmd VimEnter * execute "colorscheme " .. (exists("g:GuiLoaded") ? "twotone" : "apollo")
285282 autocmd FocusLost * silent wall
286283 autocmd BufEnter * if &pvw | setlocal nonu nornu | endif
287- autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup="Visual", timeout=150}
284+ autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup="Visual", timeout=300}
288285 autocmd TermOpen * setlocal winhighlight=Normal:CursorLine,NormalNC:CursorLine nonumber norelativenumber
289286 augroup END
290287 " }}}
291288
292-nnoremap <silent> <C-Space> <Cmd>lua MeltWhitespace()<CR>
289+nnoremap <silent> <Leader><Space> <Cmd>lua MeltWhitespace()<CR>
293290 inoremap <silent> <C-Space> <Cmd>lua MeltWhitespace()<CR>
294291
295292 nnoremap <Leader>h <Cmd>ToggleHlWord<CR>
@@ -339,8 +336,11 @@ endfunction
339336 " }}}
340337
341338 " Compact mouse menu {{{
342-aunmenu PopUp.How-to\ disable\ mouse
343-"aunmenu PopUp.-1-
339+try
340+ aunmenu PopUp.How-to\ disable\ mouse
341+ "aunmenu PopUp.-1-
342+catch /.*/
343+endtry
344344 " }}}
345345
346346 let g:term = &term
--- a/lua/utils/run.lua
+++ b/lua/utils/run.lua
@@ -51,24 +51,23 @@ function RunAsync.start(args)
5151 efm = self.regexp,
5252 })
5353 local qflist =
54- vim.fn.getqflist({ id = self.qflist_id, all = 0 }).items
55- if #qflist > 0 then
56- local errors = vim.fn.filter(qflist, function(k, v)
57- return v["type"] == "e"
58- end)
59- local warnings = vim.fn.filter(qflist, function(k, v)
60- return v["type"] == "w"
61- end)
62- self.infotext.update(
63- "["
64- .. #qflist
65- .. " lines | "
66- .. #warnings
67- .. " warnings | "
68- .. #errors
69- .. " errors]"
70- )
71- end
54+ vim.fn.getqflist({ id = self.qflist_id, all = 0 }).items
55+ -- vim.notity(vim.inspect(qflist))
56+ local errors = vim.fn.filter(qflist, function(k, v)
57+ return v["type"] == "e"
58+ end)
59+ local warnings = vim.fn.filter(qflist, function(k, v)
60+ return v["type"] == "w"
61+ end)
62+ self.infotext.update(
63+ "["
64+ .. #qflist
65+ .. " lines | "
66+ .. #warnings
67+ .. " warnings | "
68+ .. #errors
69+ .. " errors]"
70+ )
7271 end
7372 end
7473
--- a/plugin/rg.lua
+++ b/plugin/rg.lua
@@ -46,7 +46,7 @@ function rg_find_files(str)
4646 local matches = {}
4747 handle:close()
4848
49- vim.cmd("tabnew")
49+ vim.cmd("enew")
5050 for token in string.gmatch(result, "[^%s]+") do
5151 table.insert( matches, token)
5252 end