Merge branch 'master' of github.com:roodletoof/dotfiles
This commit is contained in:
@@ -110,15 +110,14 @@ do
|
|||||||
return pattern
|
return pattern
|
||||||
end
|
end
|
||||||
---@param pattern string
|
---@param pattern string
|
||||||
local function recursive_literal_vimgrep_in_same_filetype(pattern)
|
local function recursive_literal_vimgrep(pattern)
|
||||||
local extension = vim.fn.expand("%:e")
|
vim.cmd("vimgrep /" .. pattern .. "/ **/*")
|
||||||
vim.cmd("vimgrep /" .. pattern .. "/ **/*." .. extension)
|
|
||||||
end
|
end
|
||||||
---@param keymap string
|
---@param keymap string
|
||||||
---@param search_for fun(): string
|
---@param search_for fun(): string
|
||||||
local function search_for_in_same_filetype(keymap, search_for)
|
local function search_for_in_same_filetype(keymap, search_for)
|
||||||
vim.keymap.set('n', keymap, function()
|
vim.keymap.set('n', keymap, function()
|
||||||
recursive_literal_vimgrep_in_same_filetype(search_for())
|
recursive_literal_vimgrep(search_for())
|
||||||
end, { desc = "Search for word under cursor in same filetype" })
|
end, { desc = "Search for word under cursor in same filetype" })
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -175,6 +174,7 @@ local file_specific = {
|
|||||||
if not has_makefile() then
|
if not has_makefile() then
|
||||||
vim.bo.makeprg = 'tcc -run %'
|
vim.bo.makeprg = 'tcc -run %'
|
||||||
end
|
end
|
||||||
|
vim.bo.expandtab = false
|
||||||
end,
|
end,
|
||||||
cs = function()
|
cs = function()
|
||||||
vim.bo.makeprg = "dotnet"
|
vim.bo.makeprg = "dotnet"
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ snippet ,,n "" Ai
|
|||||||
\n
|
\n
|
||||||
|
|
||||||
snippet foreacharr
|
snippet foreacharr
|
||||||
for (${1:type} *${2:item} = ${3:array}; ${2:item} < &${3:array}[${4:size}]; ${2:item}++) {
|
for (${1:type} *${2:item} = (${3:array}); ${2:item} < &(${3:array})[${4:size}]; ${2:item}++) {
|
||||||
$0
|
$0
|
||||||
}
|
}
|
||||||
snippet flags
|
snippet flags
|
||||||
@@ -327,7 +327,7 @@ snippet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
snippet main
|
snippet main
|
||||||
int main( int arg_count, char *args[] ) {
|
int main(int argc, const char **argv) {
|
||||||
$0
|
$0
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ syntax on
|
|||||||
tnoremap <c-w>c <c-\><c-n><c-w>c
|
tnoremap <c-w>c <c-\><c-n><c-w>c
|
||||||
xnoremap H ^
|
xnoremap H ^
|
||||||
xnoremap L $
|
xnoremap L $
|
||||||
|
nnoremap Q @@
|
||||||
|
|
||||||
if has('clipboard')
|
if has('clipboard')
|
||||||
set clipboard^=unnamed,unnamedplus
|
set clipboard^=unnamed,unnamedplus
|
||||||
|
|||||||
Reference in New Issue
Block a user