Hice un re quilombo de cosas.
Por un lado, comenze el destete de coc.nvim, para tal fin volvi a incorporar fzf, lo cual no fue tan directo como dice la documentacion, mas sobre eso en el blog. Tambien segui modularizando la configuracion que ya estaba aprovechando los directorios que provee nvim. Retoque bastante el tema de funciones y autcmds. Modifique status y tab line ya que estaba, quedaron bastante cancheras ahora pero seguro le haga un par de cambios mas en el futuro. Agregue mappings nuevos para funciones que ya existen y los relevantes de los plugins y tambien algunas opciones de configuracion. Adopte un par nuevos para ver como me resultan: Fern y GitGutter. Reacomode todo el tema de colores y lo puse entre funciones y autocmds a ver si cargan bien despues de un nested source, todavia no lo probe. Por otro lado, retoque un par de scripts y adopte uno buenisimo para sesiones de tmux con soporte para fzf y toda la bola, tengo que ver si lo puedo tunear mas para elegir usarlo con dmenu o fzf segun como se lo invoque. Agregue un par de cambios minimos de teclas, tmux, y zsh. Ah y la configuracion de bat, porque no estaba, si bien son 3 lineas o algo asi. MUCHO laburo en el git config, porque estoy tratando de usarlo de una manera mas "pro", de a poco lo estoy integrando mas con nvim. El primer paso es probar estos commits larguisimos, y el resto lo iremos viendo.
This commit is contained in:
parent
7209bb4586
commit
6bbc6d0d9d
|
@ -0,0 +1,5 @@
|
|||
--theme="TwoDark"
|
||||
--italic-text=always
|
||||
--style="numbers,changes,header"
|
||||
--color=always
|
||||
--terminal-width=-10
|
|
@ -1,5 +1,15 @@
|
|||
[alias]
|
||||
st = status
|
||||
fx = commit --fixup=HEAD
|
||||
ci = commit -v
|
||||
ri = rebase -i --autosquash
|
||||
wc = whatchanged
|
||||
amend = commit --amend -v
|
||||
full = show --format=fuller
|
||||
noed = commit --amend --no-edit
|
||||
tr = log --graph --date-order --date=short --pretty=format:'%C(cyan)%h %C(blue)%ar%C(auto)%d%C(yellow)%s%+b %C(black)%ae'
|
||||
fz = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Fixup> ' ) && git commit --fixup "${sha%% *}"
|
||||
wd = "!f() { git --paginate diff --dirstat=cumulative,files,0 ${1:-HEAD} | awk '{print $2}' | cut -d / -f1-${2:-4} | sort | uniq; }; f"
|
||||
|
||||
[hub]
|
||||
protocol = ssh
|
||||
|
@ -11,9 +21,6 @@
|
|||
name = DeadGit
|
||||
email = adeadgit@gmail.com
|
||||
|
||||
[include]
|
||||
path = config.local
|
||||
|
||||
[sendemail]
|
||||
smtpserver = smtp.gmail.com
|
||||
smtpuser = adeadgit@gmail.com
|
||||
|
@ -35,16 +42,16 @@
|
|||
|
||||
[delta]
|
||||
features = side-by-side line-numbers decorations
|
||||
syntax-theme = Dracula
|
||||
syntax-theme = zenburn
|
||||
plus-style = syntax "#003800"
|
||||
minus-style = syntax "#3f0001"
|
||||
whitespace-error-style = 22 reverse
|
||||
|
||||
[delta "decorations"]
|
||||
commit-decoration-style = bold yellow box ul
|
||||
file-style = bold yellow ul
|
||||
commit-decoration-style = yellow ul ol
|
||||
file-style = yellow ul
|
||||
file-decoration-style = none
|
||||
hunk-header-decoration-style = cyan box ul
|
||||
hunk-header-decoration-style = cyan box
|
||||
|
||||
[delta "line-numbers"]
|
||||
line-numbers-left-style = cyan
|
||||
|
@ -124,3 +131,6 @@
|
|||
|
||||
[log]
|
||||
decorate = short
|
||||
|
||||
[include]
|
||||
path = config.local
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
let b:ale_linters = ['prettier_standard']
|
||||
let b:ale_fixers = ['prettier_standard']
|
||||
setlocal path=.,**
|
||||
setlocal path-=/usr/include
|
||||
setlocal suffixesadd+=.js
|
||||
setlocal include=^\\s*[^\/]\\+\\(from\\\|require(['\"]\\)
|
||||
setlocal define=^\\s*function
|
||||
set wildignore=*.min.*,*/.git/**/*,node_modules/*
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
|
||||
highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
|
||||
highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
|
||||
highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
|
||||
highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
|
||||
highlight! CocUnderline cterm=undercurl gui=undercurl
|
||||
highlight! PmenuSel guibg=#111111 guifg=#6699cc
|
||||
highlight! Folded ctermbg=NONE guibg=NONE
|
||||
highlight! RedrawDebugClear guibg=#080808
|
||||
highlight! NvimInternalError guifg=#080808
|
||||
highlight! DiffAdded guifg=#333333
|
||||
highlight! PmenuThumb guifg=#333333
|
||||
highlight! link CocErrorSign WarningMsg
|
||||
highlight! link CocWarningSign Number
|
||||
highlight! link CocInfoSign Type
|
||||
|
||||
if &diff
|
||||
highlight! link DiffText MatchParen
|
||||
endif
|
|
@ -0,0 +1,41 @@
|
|||
function! dead#colores#MyHighlights() abort
|
||||
highlight Trail ctermbg=red guibg=red
|
||||
call matchadd('Trail', '\s\+$', 100)
|
||||
highlight ColorColumn ctermbg=magenta
|
||||
call matchadd('ColorColumn', '\%81v', 100)
|
||||
endfunction
|
||||
|
||||
function! dead#colores#Maquillaje() abort
|
||||
highlight! VertSplit ctermbg=NONE ctermfg=0 cterm=NONE guibg=NONE guifg=#080808 gui=NONE
|
||||
highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
|
||||
highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
|
||||
highlight! ALEWarningSignLineNr ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
|
||||
highlight! ALEErrorSignLineNr ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
|
||||
highlight! CocUnderline cterm=undercurl gui=undercurl
|
||||
highlight! PmenuSel guibg=#111111 guifg=#6699cc
|
||||
highlight! RedrawDebugClear guibg=#080808
|
||||
highlight! NvimInternalError guifg=#080808
|
||||
highlight! DiffAdded guifg=#333333
|
||||
highlight! PmenuThumb guifg=#333333
|
||||
|
||||
highlight! link Folded Comment
|
||||
highlight! link NonText VertSplit
|
||||
|
||||
if &diff
|
||||
highlight! link DiffText MatchParen
|
||||
highlight! DiffAdd guibg=#0f111a guifg=#43a047
|
||||
highlight! DiffChange guibg=#0f111a guifg=#fdd835
|
||||
highlight! DiffRemoved guibg=#0f111a guifg=#e53935
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! dead#colores#Barra() abort
|
||||
highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#666666 cterm=none
|
||||
highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 cterm=none
|
||||
highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 cterm=none
|
||||
highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 cterm=none
|
||||
highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff cterm=none
|
||||
highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 cterm=none
|
||||
highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a cterm=none
|
||||
highlight User8 ctermfg=NONE ctermbg=NONE guibg=NONE guifg=NONE cterm=NONE
|
||||
endfunction
|
|
@ -1,10 +1,3 @@
|
|||
function! dead#functions#MyHighlights() abort
|
||||
highlight Trail ctermbg=red guibg=red
|
||||
call matchadd('Trail', '\s\+$', 100)
|
||||
highlight ColorColumn ctermbg=magenta
|
||||
call matchadd('ColorColumn', '\%81v', 100)
|
||||
endfunction
|
||||
|
||||
function! dead#functions#PopOutOfInsertMode() abort
|
||||
if v:insertmode
|
||||
call feedkeys("\<C-\>\<C-n>")
|
||||
|
@ -14,6 +7,7 @@ endfunction
|
|||
function! dead#functions#Relativize(v) abort
|
||||
if &number
|
||||
let &relativenumber = a:v
|
||||
let &cursorline = a:v
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ function! dead#statusline#ModeColor() abort
|
|||
endfunction
|
||||
|
||||
function! dead#statusline#CurrentMode() abort
|
||||
return ' ' . get(g:modes, mode(), '-')[1] . ' '
|
||||
return get(g:modes, mode(), '-')[1]
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#StatusLine() abort
|
||||
|
@ -13,6 +13,9 @@ function! dead#statusline#StatusLine() abort
|
|||
let l:statusline.='%#User1#'
|
||||
let l:statusline.=dead#statusline#LinePasteMode()
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=dead#statusline#GitStatus()
|
||||
let l:statusline.='%#User7#'
|
||||
let l:statusline.=' %l:%c '
|
||||
let l:statusline.=dead#statusline#ModeColor()
|
||||
let l:statusline.=dead#statusline#CurrentMode()
|
||||
return l:statusline
|
||||
|
@ -34,6 +37,14 @@ function! dead#statusline#HelpStatusLine() abort
|
|||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#FernStatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.='%#User8#'
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.='% '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#UpdateInactiveWindows()
|
||||
for winnum in range(1, winnr('$'))
|
||||
if winnum != winnr()
|
||||
|
@ -42,6 +53,15 @@ function! dead#statusline#UpdateInactiveWindows()
|
|||
endfor
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#LinePasteMode() abort
|
||||
let paste_status = &paste
|
||||
if paste_status == 1
|
||||
return ' paste '
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#RefreshStatusLine(mode)
|
||||
if (a:mode == "active" && &filetype !=? 'help')
|
||||
setlocal statusline=%!dead#statusline#StatusLine()
|
||||
|
@ -51,6 +71,9 @@ function! dead#statusline#RefreshStatusLine(mode)
|
|||
if &filetype ==? 'help'
|
||||
setlocal statusline=%!dead#statusline#HelpStatusLine()
|
||||
endif
|
||||
if &filetype ==? 'fern'
|
||||
setlocal statusline=%!dead#statusline#FernStatusLine()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#LinterStatus() abort
|
||||
|
@ -64,11 +87,7 @@ function! dead#statusline#LinterStatus() abort
|
|||
\)
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#LinePasteMode() abort
|
||||
let paste_status = &paste
|
||||
if paste_status == 1
|
||||
return ' paste '
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
function! dead#statusline#GitStatus()
|
||||
let [a,m,r] = GitGutterGetHunkSummary()
|
||||
return printf('+%d ~%d -%d', a, m, r)
|
||||
endfunction
|
||||
|
|
|
@ -12,7 +12,7 @@ function! dead#tabline#Tabline() abort
|
|||
|
||||
let s .= '%' . tab . 'T'
|
||||
let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
|
||||
let s .= ' ' . tab .':'
|
||||
let s .= ' ' . tab .' '
|
||||
let s .= (bufname !=? '' ? fnamemodify(bufname, ':f') . ' ' : '[Untitled] ')
|
||||
|
||||
if bufmodified
|
||||
|
|
|
@ -1,35 +1,12 @@
|
|||
{
|
||||
"coc.preferences.hoverTarget": "float",
|
||||
"coc.preferences.useQuickfixForLocations": true,
|
||||
"coc.preferences.bracketEnterImprove": false,
|
||||
"diagnostic.displayByAle": true,
|
||||
"diagnostic.infoSign": "● ",
|
||||
"diagnostic.errorSign": " ",
|
||||
"diagnostic.warningSign": " ",
|
||||
"diagnostic.messageTarget": "float",
|
||||
"diagnostic.enableMessage": "always",
|
||||
"explorer.width": 25,
|
||||
"explorer.icon.enableNerdfont": true,
|
||||
"explorer.icon.enableVimDevicons": false,
|
||||
"explorer.previewAction.onHover": false,
|
||||
"explorer.keyMappings": {
|
||||
"v": "open:vsplit",
|
||||
"s": "open:split",
|
||||
"f": "addFile",
|
||||
"D": "addDirectory",
|
||||
"dd": "deleteForever",
|
||||
"b": "search"
|
||||
},
|
||||
"explorer.quitOnOpen": true,
|
||||
"explorer.datetime.format": "yyyy-MM-dd HH:mm",
|
||||
"list.source.files.command": "fd",
|
||||
"list.source.files.args": ["-t", "f", "-S", "-2m", "-F", "-H"],
|
||||
"list.source.grep.args": ["--vimgrep", "--hiden", "--no-heading"],
|
||||
"list.source.mru.ignoreGitIgnore": true,
|
||||
"list.previewSplitRight": true,
|
||||
"list.indicator": ">",
|
||||
"list.selectedSignText": " ",
|
||||
"suggest.echodocSupport": true,
|
||||
"suggest.maxPreviewWidth": 100,
|
||||
"suggest.noselect": false,
|
||||
"suggest.removeDuplicateItems": true,
|
||||
"session.saveOnVimLeave": false,
|
||||
"snippets.extends": {
|
||||
"javascriptreact": ["javascript"],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
" Important {{{
|
||||
" Externals {{{
|
||||
let g:loaded_python_provider=1 " Disable python 2 interface
|
||||
let g:python_host_skip_check=1 " Skip python 2 host check
|
||||
if filereadable('bin/python3')
|
||||
|
@ -6,6 +6,10 @@ if filereadable('bin/python3')
|
|||
endif
|
||||
let g:node_host_prog = '~/.local/share/npm/bin/neovim-node-host'
|
||||
let $GIT_EDITOR = 'nvr -cc split --remote-wait'
|
||||
if executable("rg")
|
||||
set grepprg=rg\ --vimgrep
|
||||
endif
|
||||
set runtimepath+=/usr/share/vim/vimfiles/
|
||||
let mapleader="\<SPACE>"
|
||||
let maplocalleader=','
|
||||
" }}}
|
||||
|
@ -17,6 +21,8 @@ let g:ale_linters_explicit = 1
|
|||
let g:ale_use_global_executables = 1
|
||||
let g:ale_close_preview_on_insert = 1
|
||||
let g:ale_sign_highlight_linenrs = 1
|
||||
let g:ale_echo_cursor = 0
|
||||
let g:ale_virtualtext_cursor = 1
|
||||
let g:ale_set_highlights = 1
|
||||
let g:ale_set_signs = 1
|
||||
let g:ale_javascript_eslint_suppress_missing_config = 1
|
||||
|
@ -34,18 +40,10 @@ nmap <silent> <F7> <Plug>(ale_previous_wrap)
|
|||
nmap <silent> <F8> <Plug>(ale_next_wrap)
|
||||
" }}}
|
||||
" CoC {{{
|
||||
let g:coc_global_extensions = ['coc-lists', 'coc-highlight', 'coc-explorer', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet']
|
||||
let g:coc_global_extensions = ['coc-highlight', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet']
|
||||
|
||||
" Lists
|
||||
nnoremap <silent><F1> :<C-u>CocList -S --ignore-case helptags<CR>
|
||||
nnoremap <silent><F2> :<C-u>CocList -S --ignore-case files<CR>
|
||||
nnoremap <silent><F3> :<C-u>CocList --normal buffers<CR>
|
||||
nnoremap <silent><F4> :<C-u>CocList windows<CR>
|
||||
nnoremap <silent><F10> :<C-u>CocList snippets<CR>
|
||||
" Explorer
|
||||
nnoremap <silent><F5> :CocCommand explorer<CR>
|
||||
" Config
|
||||
nnoremap <silent><F6> :CocConfig<CR>
|
||||
nnoremap <silent><F6> :vsplit<CR><Bar>:CocConfig<CR>
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? coc#_select_confirm() :
|
||||
|
@ -58,7 +56,8 @@ function! s:check_back_space() abort
|
|||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
let g:coc_snippet_next = '<tab>'
|
||||
let g:coc_snippet_next = '<TAB>'
|
||||
let g:coc_snippet_prev = '<S-TAB>'
|
||||
|
||||
" <CR> to confirm completion
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<CR>"
|
||||
|
@ -92,10 +91,18 @@ let g:javascript_plugin_jsdoc = 1
|
|||
packadd! pear-tree
|
||||
packadd! loupe
|
||||
packadd! vim-commentary
|
||||
packadd! fzf.vim
|
||||
packadd! fern.vim
|
||||
packadd! gina.vim
|
||||
" }}}
|
||||
" Colors {{{
|
||||
set termguicolors
|
||||
aug colores
|
||||
au!
|
||||
au ColorScheme * call dead#colores#Barra()
|
||||
au ColorScheme * call dead#colores#Maquillaje()
|
||||
au ColorScheme * call dead#colores#MyHighlights()
|
||||
aug END
|
||||
let g:srcery_transparent_background = 1
|
||||
let g:srcery_italic = 1
|
||||
let g:srcery_underline = 1
|
||||
|
|
|
@ -3,37 +3,30 @@ scriptencoding utf-8
|
|||
if !exists('autocommands_loaded') && has('autocmd')
|
||||
let autocommands_loaded = 1
|
||||
|
||||
aug relativize
|
||||
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1)
|
||||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call dead#functions#Relativize(0)
|
||||
aug END
|
||||
|
||||
aug miscs
|
||||
au CursorHold * silent call CocActionAsync('highlight')
|
||||
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
au ColorScheme * call dead#functions#MyHighlights()
|
||||
aug END
|
||||
|
||||
aug inserts
|
||||
au InsertEnter * setlocal nocursorline
|
||||
au InsertLeave * setlocal cursorline nopaste
|
||||
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1)
|
||||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call dead#functions#Relativize(0)
|
||||
au InsertLeave * setlocal nopaste
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
au FocusLost,TabLeave * call dead#functions#PopOutOfInsertMode()
|
||||
au WinLeave * setlocal nocursorline
|
||||
aug END
|
||||
|
||||
aug file_types
|
||||
au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton
|
||||
au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
|
||||
au BufNewFile ~/doc/blog/*.md 0r ~/.config/nvim/templates/wiki.skeleton
|
||||
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
|
||||
au BufNewFile,BufRead requirements*.txt set syntax=python
|
||||
au FileType fzf tnoremap <buffer> <esc> <c-c>
|
||||
aug END
|
||||
|
||||
aug statusline
|
||||
aug status_line
|
||||
au VimEnter * call dead#statusline#UpdateInactiveWindows()
|
||||
au VimEnter,WinEnter,BufWinEnter * call dead#statusline#RefreshStatusLine('active')
|
||||
au WinLeave * call dead#statusline#RefreshStatusLine('inactive')
|
||||
augroup END
|
||||
aug END
|
||||
|
||||
aug on_save
|
||||
au BufWritePre * :%s/\s\+$//e
|
||||
|
@ -42,4 +35,13 @@ if !exists('autocommands_loaded') && has('autocmd')
|
|||
au BufWritePost *.tex !pdflatex %
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
|
||||
aug MyTerminal
|
||||
au TermOpen * setlocal wrap nonumber norelativenumber noruler signcolumn=no
|
||||
au TermOpen * set laststatus=0 showtabline=0
|
||||
" workaround for a segfault: https://github.com/neovim/neovim/issues/11548#issuecomment-583081783
|
||||
" immediately enter insert mode when switching to a terminal
|
||||
au BufEnter term://* startinsert!
|
||||
au TermClose * set laststatus=2 showtabline=2
|
||||
aug END
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
let g:gitgutter_highlight_lines = 1
|
||||
let g:gitgutter_highlight_linenrs = 1
|
||||
let g:gitgutter_set_sign_backgrounds = 1
|
||||
let g:gitgutter_sign_allow_clobber = 0
|
||||
let g:gitgutter_map_keys = 0
|
||||
let g:gitgutter_grep = 'rg --color=never'
|
|
@ -0,0 +1,45 @@
|
|||
nnoremap <silent> <F5> :Fern . -reveal=% -drawer -toggle -width=20<CR>
|
||||
|
||||
function! s:init_fern() abort
|
||||
setlocal nonumber norelativenumber
|
||||
|
||||
nmap <buffer><expr>
|
||||
\ <Plug>(fern-my-expand-or-collapse)
|
||||
\ fern#smart#leaf(
|
||||
\ "\<Plug>(fern-action-collapse)",
|
||||
\ "\<Plug>(fern-action-expand)",
|
||||
\ "\<Plug>(fern-action-collapse)",
|
||||
\ )
|
||||
|
||||
nmap <buffer><expr>
|
||||
\ <Plug>(fern-my-open-expand-collapse)
|
||||
\ fern#smart#leaf(
|
||||
\ "\<Plug>(fern-action-open:select)",
|
||||
\ "\<Plug>(fern-action-expand)",
|
||||
\ "\<Plug>(fern-action-collapse)",
|
||||
\ )
|
||||
|
||||
nmap <buffer> H <Plug>(fern-action-open:split)
|
||||
nmap <buffer> V <Plug>(fern-action-open:vsplit)
|
||||
nmap <buffer> t <Plug>(fern-action-open:tabedit)
|
||||
nmap <buffer> r <Plug>(fern-action-rename)
|
||||
nmap <buffer> R <Plug>(fern-action-reload)
|
||||
nmap <buffer> N <Plug>(fern-action-new-file)
|
||||
nmap <buffer> K <Plug>(fern-action-new-dir)
|
||||
nmap <buffer> c <Plug>(fern-action-copy)
|
||||
nmap <buffer> m <Plug>(fern-action-move)
|
||||
nmap <buffer> h <Plug>(fern-action-hidden:toggle)
|
||||
nmap <buffer> C <Plug>(fern-action-clipboard-copy)
|
||||
nmap <buffer> M <Plug>(fern-action-clipboard-move)
|
||||
nmap <buffer> P <Plug>(fern-action-clipboard-paste)
|
||||
nmap <buffer> D <Plug>(fern-action-remove)
|
||||
nmap <buffer> <BS> <Plug>(fern-action-leave)
|
||||
nmap <buffer> <space> <Plug>(fern-action-mark-toggle)
|
||||
nmap <buffer> <CR> <Plug>(fern-my-open-expand-collapse)
|
||||
nmap <buffer><nowait> o <Plug>(fern-my-expand-or-collapse)
|
||||
endfunction
|
||||
|
||||
augroup fern-custom
|
||||
autocmd! *
|
||||
autocmd FileType fern call s:init_fern()
|
||||
augroup END
|
|
@ -0,0 +1,5 @@
|
|||
nnoremap <silent> <F1> :Helptags<CR>
|
||||
nnoremap <silent> <F2> :Files <C-r>=expand("%:h")<CR>/<CR>
|
||||
nnoremap <silent> <F3> :Files<CR>
|
||||
nnoremap <silent> <F4> :Buffers<CR>
|
||||
nnoremap <silent> <M-f> :Rg
|
|
@ -0,0 +1,5 @@
|
|||
nmap ghp <Plug>(GitGutterPreviewHunk)
|
||||
nmap ghu <Plug>(GitGutterUndoHunk)
|
||||
nmap ghs <Plug>(GitGutterStageHunk)
|
||||
nmap {c <Plug>(GitGutterPrevHunk)
|
||||
nmap }c <Plug>(GitGutterNextHunk)
|
|
@ -1,6 +1,19 @@
|
|||
" Ñ master race
|
||||
nnoremap ñ ;
|
||||
nnoremap Ñ ,
|
||||
nnoremap {q :cprev
|
||||
nnoremap }q :cnext
|
||||
nnoremap {Q :cfirst
|
||||
nnoremap }Q :clast
|
||||
nnoremap <silent> {o :call append(line('.'), '')<CR>
|
||||
nnoremap <silent> }o :call append(line('.')-1, '')<CR>
|
||||
|
||||
" Find
|
||||
nnoremap <leader>F :find <C-R>=expand('%:h').'/*'<CR>
|
||||
nnoremap <leader>S :sfind <C-R>=expand('%:h').'/*'<CR>
|
||||
nnoremap <leader>V :vert sfind <C-R>=expand('%:h').'/*'<CR>
|
||||
nnoremap <leader>T :tabfind <C-R>=expand('%:h').'/*'<CR>
|
||||
nnoremap <leader>G :g/
|
||||
|
||||
" Rearrange Splits
|
||||
nnoremap <silent> <S-Left> <C-W>H
|
||||
|
@ -20,14 +33,12 @@ nnoremap <M-k> <C-W><C-K>
|
|||
nnoremap <M-l> <C-W><C-L>
|
||||
nnoremap <M-h> <C-W><C-H>
|
||||
|
||||
" Gotta Go Fast (save, buffer close, quit, messages, newlines, SOF, EOF)
|
||||
" Gotta Go Fast (save, buffers, quit, messages, newlines, SOF, EOF)
|
||||
nnoremap <silent> <leader>g :w!<CR>
|
||||
nnoremap <silent> <leader>b :bdelete<CR>
|
||||
nnoremap <silent> <leader>b :noautocmd :ls<CR>:b<space>
|
||||
nnoremap <silent> <leader>q :q!<CR>
|
||||
nnoremap <silent> <leader>Q :qa!<CR>
|
||||
nnoremap <silent> <leader>m :messages<CR>
|
||||
nnoremap <silent> <leader>o :call append(line('.'), '')<CR>
|
||||
nnoremap <silent> <leader>O :call append(line('.')-1, '')<CR>
|
||||
nnoremap <Bar> gg
|
||||
nnoremap ¿ G
|
||||
|
||||
|
|
|
@ -12,10 +12,9 @@ set hidden
|
|||
set lazyredraw
|
||||
set showmatch
|
||||
set matchpairs+=<:>
|
||||
set matchtime=1
|
||||
set cpoptions-=m
|
||||
set nojoinspaces
|
||||
set updatetime=300
|
||||
set updatetime=100
|
||||
set synmaxcol=200
|
||||
set splitbelow
|
||||
set splitright
|
||||
|
@ -23,8 +22,7 @@ set notimeout
|
|||
set ignorecase
|
||||
set scrolloff=5
|
||||
set sidescroll=5
|
||||
set shortmess+=aoOIWcs
|
||||
set foldnestmax=10
|
||||
set shortmess+=aoOWsc
|
||||
set foldmethod=marker
|
||||
set foldclose=all
|
||||
set foldlevelstart=10
|
||||
|
@ -44,22 +42,20 @@ set redrawtime=500
|
|||
set ttimeoutlen=10
|
||||
set nowritebackup
|
||||
set completeopt-=preview
|
||||
set nostartofline
|
||||
set undofile
|
||||
set undolevels=1000
|
||||
set undoreload=10000
|
||||
set formatoptions+=nl
|
||||
set formatoptions-=crot
|
||||
set fillchars+=vert:\
|
||||
set listchars+=precedes:<,extends:>
|
||||
set conceallevel=1
|
||||
set diffopt+=algorithm:histogram,indent-heuristic
|
||||
set diffopt+=foldcolumn:0
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
set fillchars=eob:\ ,stlnc:\ ,stl:\ ,vert:\│
|
||||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||
let g:netrw_dirhistmax=0
|
||||
|
||||
if exists('$SUDO_USER')
|
||||
set nobackup
|
||||
set noundofile
|
||||
endif
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
set formatoptions&
|
||||
\ formatoptions+=n
|
||||
\ formatoptions+=l
|
||||
\ formatoptions-=c
|
||||
\ formatoptions-=r
|
||||
\ formatoptions-=o
|
||||
\ formatoptions-=t
|
||||
|
|
|
@ -1,31 +1,23 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#666666 cterm=none
|
||||
highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 cterm=none
|
||||
highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 cterm=none
|
||||
highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 cterm=none
|
||||
highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff cterm=none
|
||||
highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 cterm=none
|
||||
highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a cterm=none
|
||||
|
||||
let g:modes={
|
||||
\ 'n' : ['%3*', 'NORMAL'],
|
||||
\ 'no' : ['%3*', 'N·OPERATOR PENDING'],
|
||||
\ 'v' : ['%5*', 'VISUAL'],
|
||||
\ 'V' : ['%5*', 'V·LINE'],
|
||||
\ '' : ['%5*', 'V·BLOCK'],
|
||||
\ 's' : ['%7*', 'SELECT'],
|
||||
\ 'S' : ['%7*', 'S·LINE'],
|
||||
\ '' : ['%7*', 'S·BLOCK'],
|
||||
\ 'i' : ['%4*', 'INSERT'],
|
||||
\ 'R' : ['%2*', 'REPLACE'],
|
||||
\ 'Rv' : ['%2*', 'V·REPLACE'],
|
||||
\ 'c' : ['%6*', 'COMMAND'],
|
||||
\ 'cv' : ['%6*', 'VIM EX'],
|
||||
\ 'ce' : ['%6*', 'EX'],
|
||||
\ 'r' : ['%1*', 'PROMPT'],
|
||||
\ 'rm' : ['%1*', 'MORE'],
|
||||
\ 'r?' : ['%1*', 'CONFIRM'],
|
||||
\ '!' : ['%*1', 'SHELL'],
|
||||
\ 't' : ['%*1', 'TERMINAL']
|
||||
\ 'n' : ['%3*','NORMAL'],
|
||||
\ 'no' : ['%3*','N·OPERATOR PENDING'],
|
||||
\ 'v' : ['%5*','VISUAL'],
|
||||
\ 'V' : ['%5*','V·LINE'],
|
||||
\ '' : ['%5*','V·BLOCK'],
|
||||
\ 's' : ['%7*','SELECT'],
|
||||
\ 'S' : ['%7*','S·LINE'],
|
||||
\ '' : ['%7*','S·BLOCK'],
|
||||
\ 'i' : ['%4*','INSERT'],
|
||||
\ 'R' : ['%2*','REPLACE'],
|
||||
\ 'Rv' : ['%2*','V·REPLACE'],
|
||||
\ 'c' : ['%6*','COMMAND'],
|
||||
\ 'cv' : ['%6*','VIM EX'],
|
||||
\ 'ce' : ['%6*','EX'],
|
||||
\ 'r' : ['%1*','PROMPT'],
|
||||
\ 'rm' : ['%1*','MORE'],
|
||||
\ 'r?' : ['%1*','CONFIRM'],
|
||||
\ '!' : ['%*1','SHELL'],
|
||||
\ 't' : ['%*1','TERMINAL']
|
||||
\}
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=GetGdscriptFold(v:ln)
|
||||
|
||||
function! IndentLevel(ln)
|
||||
return indent(a:ln) / &shiftwidth
|
||||
endfunction
|
||||
|
||||
function! NextLine(ln)
|
||||
let numLines = line('$')
|
||||
let current = a:ln + 1
|
||||
|
||||
while current <= numLines
|
||||
if getline(current) =~? '\v\S'
|
||||
return current
|
||||
endif
|
||||
|
||||
let current += 1
|
||||
endwhile
|
||||
|
||||
return -2
|
||||
endfunction
|
||||
|
||||
function! GetGdscriptFold(ln)
|
||||
if getline(a:ln) =~? '\v\s*$'
|
||||
return '-1'
|
||||
endif
|
||||
|
||||
let ci = IndentLevel(a:ln)
|
||||
let ni = IndentLevel(NextLine(a:ln))
|
||||
|
||||
if ni == ci
|
||||
return ci
|
||||
elseif ni < ci
|
||||
return ci
|
||||
elseif ni > ci
|
||||
return '>' . ni
|
||||
endif
|
||||
endfunction
|
|
@ -49,13 +49,13 @@ super + ctrl + m
|
|||
espejo
|
||||
|
||||
super + {a,x,v,z}
|
||||
alacritty {_,--class=flota,--class=flota -e pulsemixer,--class=multi -e termux}
|
||||
$TERMINAL {_,--class=flota,--class=flota -e pulsemixer,--class=multi -e termux}
|
||||
|
||||
super + space
|
||||
j4-dmenu-desktop --dmenu="dmenu -i -w 250 -p ' ' " --no-generic
|
||||
|
||||
super + {F1,F2,F3,F4}
|
||||
{fecha,tapa,notifocus,touchpad}
|
||||
super + {F1,F2,F3}
|
||||
{fecha,tapa,notifocus}
|
||||
|
||||
ctrl + alt + x
|
||||
xkill
|
||||
|
|
|
@ -13,6 +13,7 @@ set -g mouse on
|
|||
set -gq utf8 on
|
||||
set -gq status-utf8 on
|
||||
set -wg wrap-search off
|
||||
set -g focus-events on
|
||||
|
||||
# Ventanas
|
||||
set -wg automatic-rename on
|
||||
|
|
|
@ -5,6 +5,7 @@ autoload -Uz bracketed-paste-url-magic
|
|||
zle -N bracketed-paste bracketed-paste-url-magic
|
||||
|
||||
setopt RM_STAR_WAIT
|
||||
setopt PRINT_EIGHT_BIT # Print character as eight bit to prevent mojibake
|
||||
setopt COMBINING_CHARS # Combine accents with the base character.
|
||||
setopt INTERACTIVE_COMMENTS # Enable comments in interactive shell.
|
||||
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
|
||||
|
|
|
@ -24,10 +24,15 @@ alias \
|
|||
xp='xpkg -m > ~/doc/xbpaketes'
|
||||
|
||||
# Tmux
|
||||
if [[ -n $TMUX ]]; then
|
||||
alias txa='tmux switch-client -t'
|
||||
else
|
||||
alias txa='tmux attach-session -t'
|
||||
fi
|
||||
alias \
|
||||
txa='tmux attach -t' \
|
||||
txn='tmux new-session -s' \
|
||||
txk='tmux kill-session -t' \
|
||||
txz='tmux kill-server'
|
||||
|
||||
# LaTeX
|
||||
alias \
|
||||
|
@ -44,7 +49,8 @@ alias \
|
|||
# Dotfiles
|
||||
alias \
|
||||
hxa='hx add -v' \
|
||||
hxu='hx add -vu && hx commit -m' \
|
||||
hxu='hx add -vu' \
|
||||
hxc='hx commit' \
|
||||
hxp='hx push' \
|
||||
hxs='hx status' \
|
||||
hxl='hx log --stat' \
|
||||
|
|
|
@ -8,6 +8,8 @@ setopt AUTO_MENU # Show completion menu on a successive tab press.
|
|||
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
||||
setopt EXTENDED_GLOB # Needed for file modification glob modifiers with compinit
|
||||
setopt NO_NOMATCH # [default] unmatched patterns are left unchanged
|
||||
setopt GLOB_COMPLETE # Complete without expanding glob
|
||||
setopt NOAUTOREMOVESLASH # Do not remove postfix slash of command line
|
||||
unsetopt MENU_COMPLETE # Do not autoselect the first completion entry.
|
||||
unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
|
||||
|
||||
|
@ -20,49 +22,49 @@ else
|
|||
fi
|
||||
unset _comp_files
|
||||
|
||||
zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}' '+m:{_-}={-_}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(..) ]] && reply=(..)'
|
||||
zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}' '+m:{_-}={-_}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(..) ]] && reply=(..)'
|
||||
zstyle ':completion:*:complete:(cd|pushd):*' tag-order 'local-directories named-directories'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*:descriptions' format '%F{yellow}%d %f'
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "$XDG_CACHE_HOME/zcompcache"
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:options' description 'yes'
|
||||
zstyle ':completion:*:options' auto-description '%d'
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*' completer _complete _match _approximate
|
||||
zstyle ':completion:*:match:*' original only
|
||||
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*:descriptions' format '%F{yellow}%d %f'
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "$XDG_CACHE_HOME/zcompcache"
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:options' description 'yes'
|
||||
zstyle ':completion:*:options' auto-description '%d'
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*' completer _complete _match _approximate
|
||||
zstyle ':completion:*:match:*' original only
|
||||
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||
zstyle ':completion:*:history-words' stop yes
|
||||
zstyle ':completion:*:history-words' remove-all-dups yes
|
||||
zstyle ':completion:*:history-words' list false
|
||||
zstyle ':completion:*:history-words' menu yes
|
||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||
zstyle ':completion:*:history-words' stop yes
|
||||
zstyle ':completion:*:history-words' remove-all-dups yes
|
||||
zstyle ':completion:*:history-words' list false
|
||||
zstyle ':completion:*:history-words' menu yes
|
||||
zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
|
||||
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
||||
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
||||
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
|
||||
zstyle ':completion:*:*:kill:*' menu yes select
|
||||
zstyle ':completion:*:*:kill:*' force-list always
|
||||
zstyle ':completion:*:*:kill:*' insert-ids single
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*:parameters' list-colors '=*=34'
|
||||
zstyle ':completion:*:commands' list-colors '=*=32'
|
||||
zstyle ':completion:*:builtins' list-colors '=*=1;38;5;142'
|
||||
zstyle ':completion:*:aliases' list-colors '=*=2;38;5;120'
|
||||
zstyle ':completion:*:options' list-colors '=^(-- *)=34'
|
||||
zstyle ':completion:*:default' list-colors '=(#b)*(-- *)=36=33' '=*=36'
|
||||
zstyle ':completion:*' rehash true
|
||||
zstyle ':completion:*' list-separator " "
|
||||
zstyle ':completion:*' list-dirs-first true
|
||||
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
||||
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
||||
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
|
||||
zstyle ':completion:*:*:kill:*' menu yes select
|
||||
zstyle ':completion:*:*:kill:*' force-list always
|
||||
zstyle ':completion:*:*:kill:*' insert-ids single
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*:parameters' list-colors '=*=34'
|
||||
zstyle ':completion:*:commands' list-colors '=*=32'
|
||||
zstyle ':completion:*:builtins' list-colors '=*=1;38;5;142'
|
||||
zstyle ':completion:*:aliases' list-colors '=*=2;38;5;120'
|
||||
zstyle ':completion:*:options' list-colors '=^(-- *)=34'
|
||||
zstyle ':completion:*:default' list-colors '=(#b)*(-- *)=36=33' '=*=36'
|
||||
zstyle ':completion:*' rehash true
|
||||
zstyle ':completion:*' list-separator " "
|
||||
zstyle ':completion:*' list-dirs-first true
|
||||
|
|
|
@ -4,6 +4,7 @@ function () {
|
|||
# Bookmarks
|
||||
local -A bookmarks=(
|
||||
'nvim' '~/.config/nvim/init.vim'
|
||||
'git' '$XDG_CONFIG_HOME/git/config'
|
||||
'gtk2' '~/.config/gtk-2.0/gtkrc-2.0'
|
||||
'gtk3' '~/.config/gtk-3.0/settings.ini'
|
||||
'lf' '~/.config/lf/lfrc'
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
prog() {
|
||||
$TERMINAL --class=flota -e nvim "$@"
|
||||
}
|
||||
|
||||
diario() {
|
||||
cd "$HOME/doc/blog" || exit
|
||||
menuBlog=$(printf "Hoy\\nMañana\\nAyer\\nArchivo" | dmenu -i -w 120 -p " ")
|
||||
case $menuBlog in
|
||||
"Hoy") alacritty --class=flota -e nvim "$(date -I)".md ;;
|
||||
"Mañana") alacritty --class=flota -e nvim "$(date --date='tomorrow' +%F)".md ;;
|
||||
"Ayer") alacritty --class=flota -e nvim "$(date --date='yesterday' +%F)".md ;;
|
||||
"Hoy") prog "$(date -I)".md ;;
|
||||
"Mañana") prog "$(date --date='tomorrow' +%F)".md ;;
|
||||
"Ayer") prog "$(date --date='yesterday' +%F)".md ;;
|
||||
"Archivo") archivo ;;
|
||||
esac
|
||||
}
|
||||
|
@ -17,7 +21,7 @@ notas() {
|
|||
case $menuNota in
|
||||
"Nueva")
|
||||
nombre="$(dmenu -i -p "Titulo: ")" 2>/dev/null
|
||||
alacritty --class=flota -e nvim "$nombre".md
|
||||
prog "$nombre".md
|
||||
;;
|
||||
"Archivo") archivo ;;
|
||||
esac
|
||||
|
@ -30,13 +34,13 @@ articulo() {
|
|||
nombreForm="$(echo "$nombre" | tr ' ' '-')"
|
||||
hugo new articulos/"$nombreForm".md
|
||||
sleep 1
|
||||
alacritty --class=flota -e nvim content/articulos/"$nombre".md
|
||||
prog content/articulos/"$nombre".md
|
||||
}
|
||||
|
||||
archivo() {
|
||||
selarch=$(fd -d 1 -e md | sort -Mr | dmenu -i -w 200 -p " ")
|
||||
[ -z "$selarch" ] && exit 0
|
||||
alacritty --class=flota -e nvim "$selarch"
|
||||
prog "$selarch"
|
||||
}
|
||||
|
||||
MENU="$(printf "Artículo\\nPersonal\\nNotas" | dmenu -i -w 130 -p " ")"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
alacritty --class=multi -e termux
|
||||
$TERMINAL --class=multi -e tmux new -A -s "Z"
|
||||
|
|
|
@ -1,6 +1,44 @@
|
|||
#!/bin/sh
|
||||
#!/bin/zsh
|
||||
|
||||
if command -v tmux >/dev/null 2>&1; then
|
||||
test -z "$TMUX" && (tmux new -A -s "Z" )
|
||||
fi
|
||||
tmux_new_session() {
|
||||
if [[ -n $TMUX ]]; then
|
||||
tmux switch-client -t "$(TMUX= tmux -S "${TMUX%,*,*}" new-session -dP "$@")"
|
||||
else
|
||||
echo -n "Nombre de Sesión: "
|
||||
read REPLY
|
||||
if [[ -n $REPLY ]]; then
|
||||
tmux new-session -s "$REPLY"
|
||||
else
|
||||
tmux new-session
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
tmux_sessions() {
|
||||
# Select existing session or create session with fuzzy search tool
|
||||
# get the IDs
|
||||
if ! ID="$(tmux list-sessions 2>/dev/null)"; then
|
||||
# tmux returned error, so try cleaning up /tmp
|
||||
rm -rf /tmp/tmux*
|
||||
fi
|
||||
create_new_session="Crear Sesión"
|
||||
if [[ -n "$ID" ]]; then
|
||||
ID="${create_new_session}:\n$ID"
|
||||
else
|
||||
ID="${create_new_session}:"
|
||||
fi
|
||||
ID="$(echo $ID | fzf | cut -d: -f1)"
|
||||
if [[ "$ID" == "${create_new_session}" ]]; then
|
||||
tmux_new_session
|
||||
elif [[ -n "$ID" ]]; then
|
||||
if [[ -n $TMUX ]]; then
|
||||
tmux switch-client -t "$ID"
|
||||
else
|
||||
tmux attach-session -t "$ID"
|
||||
fi
|
||||
else
|
||||
: # Start terminal normally
|
||||
fi
|
||||
}
|
||||
|
||||
tmux_sessions
|
||||
|
|
|
@ -91,7 +91,6 @@ neovim
|
|||
neovim-remote
|
||||
newsboat
|
||||
nfs-utils
|
||||
nmap
|
||||
nodejs
|
||||
notmuch
|
||||
noto-fonts-cjk
|
||||
|
@ -112,7 +111,7 @@ pulseaudio
|
|||
pulsemixer
|
||||
python3
|
||||
python3-pip
|
||||
python3-vint
|
||||
ripgrep
|
||||
setxkbmap
|
||||
shellcheck
|
||||
shfmt
|
||||
|
|
Reference in New Issue