update
This commit is contained in:
parent
c2fcba1d77
commit
a4bd9d253b
|
@ -13,7 +13,7 @@ if t[1] != "void":
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
$5
|
$5
|
||||||
`!p
|
`!p
|
||||||
if t[1] != "void":
|
if t[1] != "void":
|
||||||
snip.rv = f"return rv;"
|
snip.rv = f"return rv;"
|
||||||
else:
|
else:
|
||||||
|
@ -60,7 +60,6 @@ snip.rv = rval`
|
||||||
${1:int} ${2:MyFunc} (${3:void});
|
${1:int} ${2:MyFunc} (${3:void});
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
|
||||||
snippet exfun "New Function with Documentation"
|
snippet exfun "New Function with Documentation"
|
||||||
/**
|
/**
|
||||||
* $2 -> $1
|
* $2 -> $1
|
||||||
|
@ -82,7 +81,7 @@ if t[1] != "void":
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
$5
|
$5
|
||||||
`!p
|
`!p
|
||||||
if t[1] != "void":
|
if t[1] != "void":
|
||||||
snip.rv = f"return rv;"
|
snip.rv = f"return rv;"
|
||||||
else:
|
else:
|
||||||
|
@ -120,7 +119,7 @@ if (-1 == `!p snip.rv = match.group(1)`) {
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet swapint "Swap two integer or numerical variables"
|
snippet swap "Swap two integer or numerical variables"
|
||||||
/* Swap Variables $1 and $2 */
|
/* Swap Variables $1 and $2 */
|
||||||
${1:Var1} = $1 + ${2:Var2};
|
${1:Var1} = $1 + ${2:Var2};
|
||||||
$2 = $1 - $2;
|
$2 = $1 - $2;
|
||||||
|
@ -141,10 +140,6 @@ def complete(t, opts):
|
||||||
return '(' + '|'.join(opts) + ')'
|
return '(' + '|'.join(opts) + ')'
|
||||||
endglobal
|
endglobal
|
||||||
|
|
||||||
snippet def "Completer for predefined Values"
|
|
||||||
$1`!p snip.rv = complete(t[1], ['EXIT_SUCCESS', 'EXIT_FAILURE', 'INT_MAX', 'INT_MIN'])`
|
|
||||||
endsnippet
|
|
||||||
|
|
||||||
snippet printf "Cast printf result to 'void' if heturn value is unneeded" bA
|
snippet printf "Cast printf result to 'void' if heturn value is unneeded" bA
|
||||||
(void)printf("$1"`!p
|
(void)printf("$1"`!p
|
||||||
if "%" in t[1]:
|
if "%" in t[1]:
|
||||||
|
@ -291,7 +286,7 @@ if (`!p snip.rv = match.group(1)` < 0) {
|
||||||
perror("fork error on creating new subprocess '`!p snip.rv = match.group(1)`'.");
|
perror("fork error on creating new subprocess '`!p snip.rv = match.group(1)`'.");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else if (!`!p snip.rv = match.group(1)`) {
|
} else if (!`!p snip.rv = match.group(1)`) {
|
||||||
/* fork runs from here */
|
/* fork runs from here */
|
||||||
${1:execve(proc, args, NULL)};
|
${1:execve(proc, args, NULL)};
|
||||||
}
|
}
|
||||||
$0
|
$0
|
||||||
|
@ -360,4 +355,3 @@ if ( fflush(stdout) ) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ if t[1] != "void":
|
||||||
else:
|
else:
|
||||||
snip.rv = ""`
|
snip.rv = ""`
|
||||||
$5
|
$5
|
||||||
`!p
|
`!p
|
||||||
if t[1] != "void":
|
if t[1] != "void":
|
||||||
snip.rv = f"return rv;"
|
snip.rv = f"return rv;"
|
||||||
else:
|
else:
|
||||||
|
@ -124,7 +124,7 @@ for var in variables:
|
||||||
snip.rv = rv`
|
snip.rv = rv`
|
||||||
|
|
||||||
private:
|
private:
|
||||||
$4
|
$4
|
||||||
|
|
||||||
};
|
};
|
||||||
`!p
|
`!p
|
||||||
|
@ -160,7 +160,7 @@ struct $1{
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet docomment "Meta Comment" A
|
snippet docomment "Meta Comment" A
|
||||||
/*
|
/*
|
||||||
* Filename: `!p snip.rv = fn`
|
* Filename: `!p snip.rv = fn`
|
||||||
* Author: ${1:Yannick Reiss}
|
* Author: ${1:Yannick Reiss}
|
||||||
* Project: ${2:Project Name}
|
* Project: ${2:Project Name}
|
||||||
|
@ -179,3 +179,20 @@ snippet let- "Declare Variable" A
|
||||||
${1:int} ${2:Variable}; /* ${3:Description} */
|
${1:int} ${2:Variable}; /* ${3:Description} */
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet pfun "prototype for function" bA
|
||||||
|
/**
|
||||||
|
* $2 -> $1
|
||||||
|
* @return $1
|
||||||
|
* @brief Description:
|
||||||
|
* ${4: Description}
|
||||||
|
* @param Parameter:`!p
|
||||||
|
params = t[3].split(",")
|
||||||
|
rval = ""
|
||||||
|
for param in params:
|
||||||
|
if len(param.split(' ')) >= 2:
|
||||||
|
rval += f"\n *\t\t{param}:\t{t[2]}_{param.split(' ')[1]}"
|
||||||
|
snip.rv = rval`
|
||||||
|
*/
|
||||||
|
${1:int} ${2:MyFunc} (${3:void});
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -545,3 +545,7 @@ snippet "@(\w)" "insert greek letter" irA
|
||||||
\\`!p letters = {'a': 'alpha', 'A': 'Alpha', 'b': 'beta', 'B': 'Beta', 'g': 'gamma', 'G': 'Gamma', 'e': 'epsilon', 'E': 'Epsilon', 'o': 'omega', 'O': 'Omega', 'm': 'mu', 'M': 'Mu'}
|
\\`!p letters = {'a': 'alpha', 'A': 'Alpha', 'b': 'beta', 'B': 'Beta', 'g': 'gamma', 'G': 'Gamma', 'e': 'epsilon', 'E': 'Epsilon', 'o': 'omega', 'O': 'Omega', 'm': 'mu', 'M': 'Mu'}
|
||||||
snip.rv = letters[ match.group(1) ]`
|
snip.rv = letters[ match.group(1) ]`
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet _- "Escape _ easier" iA
|
||||||
|
\\_
|
||||||
|
endsnippet
|
||||||
|
|
2
init.lua
2
init.lua
|
@ -21,7 +21,7 @@ vim.opt.guifont = "DroidSansMono Nerd Font 11"
|
||||||
-- set colorscheme
|
-- set colorscheme
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
colorscheme ron
|
colorscheme slate
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- vim.cmd('source ~/.config/nvim/viml/plugins.vim')
|
-- vim.cmd('source ~/.config/nvim/viml/plugins.vim')
|
||||||
|
|
|
@ -3,7 +3,7 @@ let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-
|
||||||
let v:this_session=expand("<sfile>:p")
|
let v:this_session=expand("<sfile>:p")
|
||||||
silent only
|
silent only
|
||||||
silent tabonly
|
silent tabonly
|
||||||
cd ~/Documents/HSRM/Semester4/EmbSec/Praktikum/it-security/Docs
|
cd ~/.config/nvim/viml
|
||||||
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
let s:wipebuf = bufnr('%')
|
let s:wipebuf = bufnr('%')
|
||||||
endif
|
endif
|
||||||
|
@ -13,15 +13,12 @@ if &shortmess =~ 'A'
|
||||||
else
|
else
|
||||||
set shortmess=aoO
|
set shortmess=aoO
|
||||||
endif
|
endif
|
||||||
badd +132 Documentation.tex
|
badd +1 legacyconf.vim
|
||||||
badd +109 ~/.config/nvim/UltiSnips/tex.snippets
|
|
||||||
badd +7 ~/.config/nvim/UltiSnips/all.snippets
|
|
||||||
argglobal
|
argglobal
|
||||||
%argdel
|
%argdel
|
||||||
$argadd Documentation.tex
|
$argadd legacyconf.vim
|
||||||
edit Documentation.tex
|
edit legacyconf.vim
|
||||||
argglobal
|
argglobal
|
||||||
balt ~/.config/nvim/UltiSnips/all.snippets
|
|
||||||
setlocal fdm=expr
|
setlocal fdm=expr
|
||||||
setlocal fde=nvim_treesitter#foldexpr()
|
setlocal fde=nvim_treesitter#foldexpr()
|
||||||
setlocal fmr={{{,}}}
|
setlocal fmr={{{,}}}
|
||||||
|
@ -30,12 +27,12 @@ setlocal fdl=0
|
||||||
setlocal fml=1
|
setlocal fml=1
|
||||||
setlocal fdn=20
|
setlocal fdn=20
|
||||||
setlocal nofen
|
setlocal nofen
|
||||||
let s:l = 132 - ((27 * winheight(0) + 19) / 38)
|
let s:l = 1 - ((0 * winheight(0) + 19) / 38)
|
||||||
if s:l < 1 | let s:l = 1 | endif
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
keepjumps exe s:l
|
keepjumps exe s:l
|
||||||
normal! zt
|
normal! zt
|
||||||
keepjumps 132
|
keepjumps 1
|
||||||
normal! 014|
|
normal! 0
|
||||||
tabnext 1
|
tabnext 1
|
||||||
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||||
silent exe 'bwipe ' . s:wipebuf
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) (format=lualatex 2023.7.21) 16 AUG 2023 18:24
|
||||||
|
restricted system commands enabled.
|
||||||
|
**viml/legacyconf.vim
|
||||||
|
(./viml/legacyconf.vim
|
||||||
|
LaTeX2e <2022-11-01> patch level 1
|
||||||
|
Lua module: luaotfload 2022-10-03 3.23 Lua based OpenType font support
|
||||||
|
Lua module: lualibs 2022-10-04 2.75 ConTeXt Lua standard libraries.
|
||||||
|
Lua module: lualibs-extended 2022-10-04 2.75 ConTeXt Lua libraries -- extended c
|
||||||
|
ollection.
|
||||||
|
luaotfload | conf : Root cache directory is "/home/nick/.texlive/texmf-var/luate
|
||||||
|
x-cache/generic/names".
|
||||||
|
luaotfload | init : Loading fontloader "fontloader-2022-10-03.lua" from kpse-res
|
||||||
|
olved path "/usr/share/texmf-dist/tex/luatex/luaotfload/fontloader-2022-10-03.lu
|
||||||
|
a".
|
||||||
|
Lua-only attribute luaotfload@noligature = 1
|
||||||
|
luaotfload | init : Context OpenType loader version 3.120
|
||||||
|
Inserting `luaotfload.node_processor' in `pre_linebreak_filter'.
|
||||||
|
Inserting `luaotfload.node_processor' in `hpack_filter'.
|
||||||
|
Inserting `luaotfload.glyph_stream' in `glyph_stream_provider'.
|
||||||
|
Inserting `luaotfload.define_font' in `define_font'.
|
||||||
|
Lua-only attribute luaotfload_color_attribute = 2
|
||||||
|
luaotfload | conf : Root cache directory is "/home/nick/.texlive/texmf-var/luate
|
||||||
|
x-cache/generic/names".
|
||||||
|
Inserting `luaotfload.harf.strip_prefix' in `find_opentype_file'.
|
||||||
|
Inserting `luaotfload.harf.strip_prefix' in `find_truetype_file'.
|
||||||
|
Removing `luaotfload.glyph_stream' from `glyph_stream_provider'.
|
||||||
|
Inserting `luaotfload.harf.glyphstream' in `glyph_stream_provider'.
|
||||||
|
Inserting `luaotfload.harf.finalize_vlist' in `post_linebreak_filter'.
|
||||||
|
Inserting `luaotfload.harf.finalize_hlist' in `hpack_filter'.
|
||||||
|
Inserting `luaotfload.cleanup_files' in `wrapup_run'.
|
||||||
|
Inserting `luaotfload.harf.finalize_unicode' in `finish_pdffile'.
|
||||||
|
Inserting `luaotfload.glyphinfo' in `glyph_info'.
|
||||||
|
Lua-only attribute luaotfload.letterspace_done = 3
|
||||||
|
Inserting `luaotfload.aux.set_sscale_dimens' in `luaotfload.patch_font'.
|
||||||
|
Inserting `luaotfload.aux.set_font_index' in `luaotfload.patch_font'.
|
||||||
|
Inserting `luaotfload.aux.patch_cambria_domh' in `luaotfload.patch_font'.
|
||||||
|
Inserting `luaotfload.aux.fixup_fontdata' in `luaotfload.patch_font_unsafe'.
|
||||||
|
Inserting `luaotfload.aux.set_capheight' in `luaotfload.patch_font'.
|
||||||
|
Inserting `luaotfload.aux.set_xheight' in `luaotfload.patch_font'.
|
||||||
|
Inserting `luaotfload.rewrite_fontname' in `luaotfload.patch_font'. L3 programm
|
||||||
|
ing layer <2023-02-22>
|
||||||
|
Inserting `tracingstacklevels' in `input_level_string'.
|
||||||
|
|
||||||
|
! LaTeX Error: Missing \begin{document}.
|
||||||
|
|
||||||
|
See the LaTeX manual or LaTeX Companion for explanation.
|
||||||
|
Type H <return> for immediate help.
|
||||||
|
...
|
||||||
|
|
||||||
|
l.1 "
|
||||||
|
NERDTree remap
|
||||||
|
?
|
||||||
|
! Emergency stop.
|
||||||
|
...
|
||||||
|
|
||||||
|
l.1 "
|
||||||
|
NERDTree remap
|
||||||
|
You're in trouble here. Try typing <return> to proceed.
|
||||||
|
If that doesn't work, type X <return> to quit.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Here is how much of LuaTeX's memory you used:
|
||||||
|
21 strings out of 478285
|
||||||
|
100000,1977958 words of node,token memory allocated 333 words of node memory still in use:
|
||||||
|
2 hlist, 1 local_par, 1 dir, 1 glue, 3 kern, 1 glyph, 3 attribute, 39 glue_sp
|
||||||
|
ec, 3 attribute_list, 1 temp nodes
|
||||||
|
avail lists: 2:5,3:3,4:1,5:1,7:1
|
||||||
|
20343 multiletter control sequences out of 65536+600000
|
||||||
|
14 fonts using 591679 bytes
|
||||||
|
13i,0n,12p,58b,15s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||||
|
! ==> Fatal error occurred, no output PDF file produced!
|
|
@ -39,7 +39,7 @@ return require("packer").startup(function(use)
|
||||||
use("prabirshrestha/vim-lsp")
|
use("prabirshrestha/vim-lsp")
|
||||||
use("nvim-tree/nvim-web-devicons")
|
use("nvim-tree/nvim-web-devicons")
|
||||||
use("mg979/vim-visual-multi")
|
use("mg979/vim-visual-multi")
|
||||||
use("Yggdroot/indentline")
|
-- use("Yggdroot/indentline")
|
||||||
use({ "romgrk/barbar.nvim", wants = "nvim-web-devicons" })
|
use({ "romgrk/barbar.nvim", wants = "nvim-web-devicons" })
|
||||||
use({ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" })
|
use({ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" })
|
||||||
use("quangnguyen30192/cmp-nvim-ultisnips")
|
use("quangnguyen30192/cmp-nvim-ultisnips")
|
||||||
|
|
|
@ -22,9 +22,6 @@ augroup FormatAutogroup
|
||||||
autocmd BufWritePost * FormatWrite
|
autocmd BufWritePost * FormatWrite
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" Update Plugins and Treesitter languages
|
|
||||||
autocmd VimLeave * mksession! ~/.config/nvim/lastSession.vi
|
|
||||||
|
|
||||||
" set spellcheck according to Filetype
|
" set spellcheck according to Filetype
|
||||||
autocmd VimEnter * set spell spelllang=en_us
|
autocmd VimEnter * set spell spelllang=en_us
|
||||||
|
|
||||||
|
@ -41,18 +38,11 @@ nnoremap <C-g> :call Litde()<CR>
|
||||||
|
|
||||||
" Theme
|
" Theme
|
||||||
nnoremap <M-+> :colo morning<CR>
|
nnoremap <M-+> :colo morning<CR>
|
||||||
nnoremap <M--> :colo ron<CR>
|
nnoremap <M--> :colo slate<CR>
|
||||||
|
|
||||||
" Fuzzy finder
|
" Fuzzy finder
|
||||||
nnoremap <C-f> :Lines<CR>
|
nnoremap <C-f> :Lines<CR>
|
||||||
|
|
||||||
" Save using strg+s
|
|
||||||
nnoremap <C-s> :w<CR>
|
|
||||||
|
|
||||||
" autosave for Markdown and Latex
|
|
||||||
set updatetime=800
|
|
||||||
autocmd CursorHold *.md w
|
|
||||||
|
|
||||||
function RestoreSession()
|
function RestoreSession()
|
||||||
if @% == ""
|
if @% == ""
|
||||||
source ~/.config/nvim/lastSession.vim
|
source ~/.config/nvim/lastSession.vim
|
||||||
|
@ -84,3 +74,5 @@ function Update_Sys()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
nnoremap <M-u> :call Update_Sys()<CR>
|
nnoremap <M-u> :call Update_Sys()<CR>
|
||||||
|
|
||||||
|
nnoremap <C-b> :!lualatex % < /dev/null<CR>
|
||||||
|
|
|
@ -2,12 +2,5 @@ function Common()
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function Ctypes()
|
|
||||||
let @c = "\<ESC>0i/*\<ESC>A */\<ESC>0j"
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" load common macros for all Filetypes
|
" load common macros for all Filetypes
|
||||||
autocmd BufEnter * :call Common()
|
autocmd BufEnter * :call Common()
|
||||||
|
|
||||||
" load c-type macros
|
|
||||||
autocmd BufEnter *\.c Ctypes()
|
|
||||||
|
|
Loading…
Reference in New Issue