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