• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

コミットメタ情報

リビジョン819f77d40f71fe6054e5697646b3650175f0a78d (tree)
日時2023-02-03 19:55:27
作者badcoff33 <none@none>
コミッターbadcoff33

ログメッセージ

minor updates

変更サマリ

差分

--- a/after/ftplugin/lua.vim
+++ b/after/ftplugin/lua.vim
@@ -18,7 +18,7 @@ vnoremap <buffer> <LocalLeader>f :call FormatLua()<CR>
1818 iabbrev xcmd vim.api.nvim_create_user_command({name}, {command}, {*opts})<C-o>T(
1919 iabbrev xmap vim.api.nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts})<C-o>T(
2020 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(
21+iabbrev xauc vim.api.nvim_create_autocmd({events}, {*opts})<C-o>T(
2222
2323 if !executable("stylua")
2424 finish
--- a/colors/twotone.vim
+++ b/colors/twotone.vim
@@ -78,10 +78,10 @@ execute "hi Conditional" s:Fg(s:red) s:Attr("bold")
7878 execute "hi Constant" s:Fg(s:blue)
7979 execute "hi Directory" s:Fg(s:blue) s:Attr("underline") s:Special(s:blue)
8080 execute "hi Error" s:Fg(s:red) s:Bg("bg") s:Attr("underline")
81-execute "hi ErrorMsg" s:Fg(s:red) s:Bg("bg")
81+execute "hi ErrorMsg" s:Fg(s:white) s:Bg(s:red)
8282 execute "hi Function" s:Fg(s:blue)
8383 execute "hi Identifier" s:Fg(s:blue)
84-execute "hi ModeMsg" s:Fg(s:blue) s:Bg("bg") s:Attr("bold")
84+execute "hi ModeMsg" s:Fg(s:white) s:Bg(s:blue) s:Attr("NONE")
8585 execute "hi Number" s:Fg(s:blue)
8686 execute "hi PreCondit" s:Fg(s:blue) s:Attr("bold")
8787 execute "hi PreProc" s:Fg(s:silver4) s:Attr("bold")
--- a/init.vim
+++ b/init.vim
@@ -127,8 +127,6 @@ nnoremap <A-Right> <End>
127127 xnoremap <A-Left> 0
128128 xnoremap <A-Right> $
129129
130-" Replace current inner word with one key press
131-nnoremap <BS> ciw
132130 " Alternative keys to delete words in insert mode
133131 inoremap <C-BS> <C-o>db
134132 inoremap <C-Del> <C-o>de
@@ -229,9 +227,8 @@ nnoremap <expr> <Leader>v ':silent vimgrep /' .. expand("<cword>") .. '/ ' .. ex
229227
230228 """ :buffer, :edit and :find
231229 nnoremap <Leader>t <cmd>tab split<CR>
232-nnoremap <Leader>e :edit<space>
233-nnoremap <Leader>, :edit <C-r>=stdpath("config") .. g:slash<CR>
234-nnoremap <Leader>. :edit <C-r>=expand("%:h")=="." ? ".\\" : expand("%:h") .. g:slash<CR>
230+nnoremap <Leader>E :edit <C-r>=stdpath("config") .. g:slash<CR>
231+nnoremap <Leader>e :edit <C-r>=expand("%:h")=="." ? ".\\" : expand("%:h") .. g:slash<CR>
235232 nnoremap <Leader>b :buffer<space>
236233 nnoremap <Leader>f :find<Space>
237234 nnoremap <Leader>x <Cmd>bdelete<CR>
@@ -268,7 +265,7 @@ function! s:ToggleQuickfix()
268265 endif
269266 endif
270267 endfunction
271-nnoremap <Leader>c <cmd>call <SID>ToggleQuickfix()<CR>
268+nnoremap <BS> <cmd>call <SID>ToggleQuickfix()<CR>
272269 nnoremap <Leader>G <cmd>clast<CR>
273270
274271 command! -nargs=0 IC :set ignorecase nosmartcase
--- a/lua/utils/files.lua
+++ b/lua/utils/files.lua
@@ -1,44 +1,51 @@
11 local files = {}
22 local keymap = vim.api.nvim_set_keymap
3+local on_windows = vim.loop.os_uname().version:match("Windows")
4+
5+local function join_paths(...)
6+ local path_sep = on_windows and "\\" or "/"
7+ local result = table.concat({ ... }, path_sep)
8+ return result
9+end
310
411 split_string = function(s, d)
5- chunks = {}
6- for substring in string.gmatch(s, d) do
7- table.insert(chunks, substring)
8- end
9- return chunks
12+ chunks = {}
13+ for substring in string.gmatch(s, d) do
14+ table.insert(chunks, substring)
15+ end
16+ return chunks
1017 end
1118
1219 on_path = function(name)
13- paths = split_string(os.getenv("PATH"), "[^;]+")
14- found = nil
15- for i = 1, #paths do
16- candidate = paths[i] .. "\\" .. name
17- local f = io.open(candidate, "r")
18- if f ~= nil then
19- found = candidate
20- io.close(f)
21- break
22- end
23- end
24- return found
20+ paths = split_string(os.getenv("PATH"), "[^;]+")
21+ found = nil
22+ for i = 1, #paths do
23+ candidate = paths[i] .. "\\" .. name
24+ local f = io.open(candidate, "r")
25+ if f ~= nil then
26+ found = candidate
27+ io.close(f)
28+ break
29+ end
30+ end
31+ return found
2532 end
2633
2734 exe = on_path("cmd.exe")
2835
2936 LsFilter = function()
30- ft2regex = {
31- c = ".[ch]$",
32- vim = ".vim",
33- lua = ".lua",
34- py = ".py$",
35- cmake = ".cmake CMakeLists.txt",
36- }
37- if ft2regex[vim.bo.ft] ~= nil then
38- return ft2regex[vim.bo.ft]
39- else
40- return ""
41- end
37+ ft2regex = {
38+ c = ".[ch]$",
39+ vim = ".vim",
40+ lua = ".lua",
41+ py = ".py$",
42+ cmake = ".cmake CMakeLists.txt",
43+ }
44+ if ft2regex[vim.bo.ft] ~= nil then
45+ return ft2regex[vim.bo.ft]
46+ else
47+ return ""
48+ end
4249 end
4350
4451 return files
--- a/plugin/ctags.lua
+++ b/plugin/ctags.lua
@@ -8,7 +8,7 @@ local ctags_locked = true -- disable until completed
88
99 function CtagsTriggerUpdate()
1010 local ctags_options = ""
11- local running = vim.fn.jobwait({ctags_jobid}, 0)[1] == -1
11+ local running = vim.fn.jobwait({ ctags_jobid }, 0)[1] == -1
1212
1313 if running then
1414 return
@@ -31,21 +31,14 @@ end
3131
3232 gid_ctags = vim.api.nvim_create_augroup("Ctags", { clear = true })
3333
34-vim.api.nvim_create_autocmd(
35- { "BufWritePost" },
36- {
37- group = gid_ctags,
38- pattern = { "*.c", "*.h" },
39- callback = CtagsTriggerUpdate,
40- }
41-)
42-
43-vim.api.nvim_create_autocmd(
44- { "BufWritePost" },
45- {
46- group = gid_ctags,
47- pattern = { "*.cxx", "*.hxx" },
48- callback = CtagsTriggerUpdate,
49- }
50-)
51-
34+vim.api.nvim_create_autocmd({ "BufWritePost" }, {
35+ group = gid_ctags,
36+ pattern = { "*.c", "*.h" },
37+ callback = CtagsTriggerUpdate,
38+})
39+
40+vim.api.nvim_create_autocmd({ "BufWritePost" }, {
41+ group = gid_ctags,
42+ pattern = { "*.cxx", "*.hxx" },
43+ callback = CtagsTriggerUpdate,
44+})