Skip to content

Commit

Permalink
kasjf
Browse files Browse the repository at this point in the history
  • Loading branch information
ediw8311xht committed Nov 29, 2024
1 parent 00d1859 commit 11824a3
Show file tree
Hide file tree
Showing 18 changed files with 180 additions and 8 deletions.
1 change: 1 addition & 0 deletions bashrc_files/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ alias rifs=" IFS=$' \t\n'"
alias pifs=' printf "\n_%q_\n\n" "${IFS}"'
alias getfont=' fc-list -v | grep -i '
alias gital=' git log --source --all -S'
alias gitig=' git status --ignored'
alias git_mt=' git log --pretty=format:"%h %s" --graph'
alias gport=' netstat -lntu | grep -Pi'
alias gd=' xclip -selection "clipboard" <<< "${PWD}"'
Expand Down
1 change: 0 additions & 1 deletion bashrc_files/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ list_files_pac() {
if yay -Qi "${1}" &>/dev/null ; then
yay -Ql "${1}"
elif yay -Si "${1}" &>/dev/null ; then
echo "HER"
if ! pkgfile -sl "${1}" ; then
echo "Package in AUR and not installed. Can't list files." >&2; return 1
fi
Expand Down
18 changes: 18 additions & 0 deletions nvim/ftplugin/bash.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

let s:slb=[
\ '####################',
\ '( #-START-SUBSHELL-#',
\ '####################',
\]

let s:sle=[
\ '####################',
\ ') #---END-SUBSHELL-#',
\ '####################',
\]

let g:subshell_begin=join(s:slb, "\n")
let g:subshell_end=join(s:sle, "\n")

nnoremap <buffer> <leader>Sb :put =g:subshell_begin<esc>
nnoremap <buffer> <leader>Se :put =g:subshell_end<esc>
4 changes: 4 additions & 0 deletions nvim/ftplugin/bashrc.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

let @j = ' '
let @i = '$"jp"op'

4 changes: 4 additions & 0 deletions nvim/ftplugin/cpp.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

nnoremap <buffer> <leader>x :!"$HOME/bin/make_run_cpp.sh" %<esc>
nnoremap <buffer> <leader>Xz :!"$HOME/bin/make_run_cpp.sh"
nnoremap <buffer> <leader>xv :!"$HOME/bin/make_run_cpp.sh" <esc>
4 changes: 4 additions & 0 deletions nvim/ftplugin/css.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

nnoremap <buffer> <leader>vp :%!prettier --parser="css"<esc>
nnoremap <buffer> <leader>R :!qutebrowser ":reload"<esc>
setlocal tabstop=2 shiftwidth=2 softtabstop=4 expandtab
10 changes: 10 additions & 0 deletions nvim/ftplugin/elixir.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

set keywordprg="${HOME}/bin/elixir_keywordprg.sh"
nnoremap <buffer> <leader>vF :!mix format %<esc>
vnoremap <buffer> <leader>vf :!mix format -<esc>
"------For-Mix-Projects------"
nnoremap <buffer> <leader>vt :Mix test<esc>
nnoremap <buffer> <leader>vC :Mix compile<esc>
hi Comment gui=italic guibg=NONE guifg=#0070FF
33 changes: 33 additions & 0 deletions nvim/ftplugin/html.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

" " -- HTML Tags -- "
"inoremap <buffer> <C-l> <esc>:call search("[<][^>]*[>]") <enter>a
"inoremap <buffer> <C-h> <esc>:call search("[<][^>]*[>]", "b") <enter>a
"inoremap <buffer> <C-q> <esc>:call search("[<][^>]*\\zs[>]", "b") <enter>a
"inoremap <buffer> <C-w> <esc>:call search("[<][^>]*\\zs[>]") <enter>a
"nnoremap <buffer> <C-f> <esc>vit
"
"vnoremap <buffer> <C-l> /\v[<][^>]*[>]<enter>
"vnoremap <buffer> <c-h> ?\v[<][^>]*[>]<enter>
"vnoremap <buffer> <C-q> ?\v\v[<][^>]*[>]<enter>
"vnoremap <buffer> <C-w> /\v[<][^>]*\\zs[>]<enter>
"
"nnoremap <buffer> <leader>m i<span class="math inline">\(\)</span><esc>F(a
""nnoremap <leader>M 0f(a
fu! HTMLSettings()
nnoremap <buffer> <leader>vp :%!tidy --parser="html"<esc>
nnoremap <buffer> <leader>x :!xmllint %<esc>
setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
endfu

fu! HTMLMain()
if &ft != "markdown"
call HTMLSettings()
endif
endfu

call HTMLMain()


"
""nnoremap <leader>r i<img src="images/"/><esc>F"i
""nnoremap <leader>R :!qutebrowser ":reload"<esc>
3 changes: 3 additions & 0 deletions nvim/ftplugin/kalker.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

nnoremap <buffer> <leader>x :!kalker_parse.sh % deg<esc>
nnoremap <buffer> <leader>X :!kalker_parse.sh % rad<esc>
3 changes: 3 additions & 0 deletions nvim/ftplugin/lisp.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

nnoremap <buffer> <leader>x :!sbcl --script "%"<CR>
nnoremap <buffer> <leader>W :w<CR>
2 changes: 2 additions & 0 deletions nvim/ftplugin/lua.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
43 changes: 43 additions & 0 deletions nvim/ftplugin/markdown.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

let g:loaded_mark_preview = 0

fu! MakeSafe(f)
return substitute(a:f, '[/.]', '\\%', 'g')
endfu

fu! WritePreview()
let l:temp_file = '/tmp/' . MakeSafe(expand('%:p')) . ".html"
echo l:temp_file
execute "!pandoc % > " . l:temp_file
return l:temp_file
endfu

fu! PreviewMarkdown(flag = "")
let l:temp_file = WritePreview()

if a:flag == "q"
execute ":silent !qutebrowser " . l:temp_file
elseif a:flag == "b"
execute ":silent !${BROWSER} " . l:temp_file
elseif g:loaded_mark_preview == 0
execute ":vertical:T lynx " . l:temp_file
let g:loaded_mark_preview = 1
else
execute ":vertical:Topen"
execute ":T \<c-r>"
endif
endfu

"colorscheme cyberpunk-neon
"call CorrectColors()
"set formatexpr=1
"set textwidth=80
"set wrap
"set spell
vnoremap <buffer> <leader>x :!pandoc -f commonmark_x -t commonmark_x<CR>
nnoremap <buffer> <leader>x :%!pandoc -f commonmark_x -t commonmark_x<CR>
nnoremap <buffer> <leader>oo :silent call PreviewMarkdown()<esc>
nnoremap <buffer> <leader>oq :silent call PreviewMarkdown("q")<esc>
nnoremap <buffer> <leader>ob :silent call PreviewMarkdown("b")<esc>
nnoremap <buffer> <leader>oO :MarkdownPreview<esc>
nnoremap <buffer> <leader>vS :set spell!<CR>
2 changes: 2 additions & 0 deletions nvim/ftplugin/quick_make_py.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

"nnoremap <leader>X :!kalker_parse.sh % rad<esc>
23 changes: 23 additions & 0 deletions nvim/ftplugin/rasi.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
" ftplugin/rasi.vim

" Vim Plugin: {{{1
" File: rasi.vim
" Author: Marco Cantoro <marco.cantoro92@outlook.it>
" Description: Rofi Advanced Style Information
" Last Modified: 2020-11-09
" }}}

" File Type Plugin Guards: {{{1
if exists('g:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
" }}}

" Filetype Options: {{{1
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
setlocal iskeyword+=-
" }}}

let b:undo_ftplugin = "setl com< cms< fo< spell< fdm< ts< sts< et< sw< tw< "
3 changes: 3 additions & 0 deletions nvim/ftplugin/tex.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

filetype plugin indent off
set nocindent
2 changes: 1 addition & 1 deletion nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ filetype plugin on
filetype plugin indent on
syntax enable
set autoread
set autoindent
set cindent
set backup
set clipboard=unnamedplus
set encoding=utf-8
Expand Down
29 changes: 24 additions & 5 deletions nvim/language_specific/templates/template.tex
Original file line number Diff line number Diff line change
@@ -1,33 +1,52 @@
%! TeX program = xelatex

\documentclass[11pt]{scrartcl}
\documentclass[fontsize=12pt, DIV=calc]{scrartcl}
\usepackage{fontspec}
\usepackage{amsfonts}
% \usepackage{inconsolata}
% \usepackage[paperheight=8.5in,paperwidth=13.0in,margin=0.1in,headheight=0.0in,footskip=0.5in]{geometry}
\usepackage{listings}
\usepackage[paperheight=40in,paperwidth=12in,margin=0.5in,heightrounded]{geometry}
\usepackage[paperheight=40in,paperwidth=10in,margin=0.4in,heightrounded]{geometry}
\usepackage{array}
\usepackage{makecell}
\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage{xfrac}
\usepackage[svgnames]{xcolor}
% \pagecolor{black}
\setmainfont[Color=black]{FantasqueSansMono Nerd Font Mono}
\setsansfont[Color=black]{FantasqueSansMono Nerd Font Mono}
\setmonofont[Color=black]{FantasqueSansMono Nerd Font Mono}
\setmainfont[Color=black]{Agave}
\setsansfont[Color=black]{Agave}
\setmonofont[Color=black]{Agave}
\setlength{\mathindent}{22pt}
\addtokomafont{section}{\color{MediumBlue}}
\addtokomafont{subsection}{\color{black}}
\addtokomafont{subsubsection}{\color{black}}
\DeclareMathSizes{15}{17}{15}{20}

\newcommand{\NN}{\\\null}
\newcommand{\NT}{\\\null\quad\quad}
\newcommand{\T}{\quad\quad}
\newcommand{\SC}[1]{\section*{#1}}
\newcommand{\SCS}[1]{\subsection*{#1}}
\newcommand{\LS}{\begin{itemize}}
\newcommand{\LE}{\end{itemize}}
\newcommand{\X}[1]{\texttt{#1}}
\newcommand\OV[2]{\displaystyle\overset{#2}{#1}}
\newcommand\UN[2]{\displaystyle\underset{#2}{#1}}
\newcommand\OO[3]{\displaystyle\underset{#2}{\overset{#3}{#1}}}
\newcommand\IMG[2]{\begin{center}\includegraphics[totalheight=#1]{#2}\end{center}}

\title{Notes: 5.4-5.5 and 6.1-6.4}
\date{December 1, 2024}
\begin{document}
\maketitle
%------------------------------
% For tables
%------------------------------
\renewcommand{\arraystretch}{4}
\renewcommand{\cellalign}{l}
%------------------------------
\mathversion{bold}

\end{document}

3 changes: 2 additions & 1 deletion nvim/lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ local leader_mappings={
{ n, F, '', 'ob' , ':silent !"${BROWSER:-"brave"}" %<CR>' },
{ n, F, '', 'oq' , ':silent !"qutebrowser" %<CR>' },
{ n, F, '', 'q' , ':bd' },
{ n, F, '', 's' , ':source ~/.config/nvim/init.vim<esc>' },
{ n, F, '', 's' , ':NERDTreeToggle<CR>' },
{ n, F, '', 'S' , ':source ~/.config/nvim/init.vim<esc>' },
{ n, F, '', 'T' , ':term<esc>' },
{ n, F, '', 'u' , ':Lf<esc>' },
{ n, F, '', 'vv' , ':call TogVE()<CR>' },
Expand Down

0 comments on commit 11824a3

Please sign in to comment.