mirror of https://github.com/mitchell/dotfiles.git
Adopt use of NNN instead of NerdTree and add some aliases
This commit is contained in:
parent
fbe9eb511e
commit
517bc5f587
|
@ -16,6 +16,7 @@ function btre -a device -d 'Reconnect to a known bluetooth device'
|
||||||
bluetoothctl pair $devices[$index]
|
bluetoothctl pair $devices[$index]
|
||||||
bluetoothctl trust $devices[$index]
|
bluetoothctl trust $devices[$index]
|
||||||
bluetoothctl connect $devices[$index]
|
bluetoothctl connect $devices[$index]
|
||||||
|
sleep 2
|
||||||
|
|
||||||
pkill bluetoothctl
|
pkill bluetoothctl
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
||||||
alias rcp 'rsync -aP'
|
alias rcp 'rsync -aP'
|
||||||
alias dm 'docker-machine'
|
alias dm 'docker-machine'
|
||||||
alias v 'nvim +FZF'
|
alias v 'nvim +FZF'
|
||||||
|
alias j 'joplin'
|
||||||
alias vg 'vagrant'
|
alias vg 'vagrant'
|
||||||
alias tf 'terraform'
|
alias tf 'terraform'
|
||||||
alias tocb 'xclip -in -selection clipboard'
|
alias tocb 'xclip -in -selection clipboard'
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Rename this file to match the name of the function
|
||||||
|
# e.g. ~/.config/fish/functions/n.fish
|
||||||
|
# or, add the lines to the 'config.fish' file.
|
||||||
|
|
||||||
|
function n --wraps nnn --description 'support nnn quit and change directory'
|
||||||
|
# Block nesting of nnn in subshells
|
||||||
|
if test -n "$NNNLVL"
|
||||||
|
if [ (expr $NNNLVL + 0) -ge 1 ]
|
||||||
|
echo "nnn is already running"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||||
|
# To cd on quit only on ^G, remove the "-x" as in:
|
||||||
|
# set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||||
|
# NOTE: NNN_TMPFILE is fixed, should not be modified
|
||||||
|
if test -n "$XDG_CONFIG_HOME"
|
||||||
|
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||||
|
else
|
||||||
|
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||||
|
# stty start undef
|
||||||
|
# stty stop undef
|
||||||
|
# stty lwrap undef
|
||||||
|
# stty lnext undef
|
||||||
|
|
||||||
|
nnn -de $argv
|
||||||
|
|
||||||
|
if test -e $NNN_TMPFILE
|
||||||
|
source $NNN_TMPFILE
|
||||||
|
rm $NNN_TMPFILE
|
||||||
|
end
|
||||||
|
end
|
71
.vimrc
71
.vimrc
|
@ -3,49 +3,50 @@ call plug#begin('~/.vim/plugged')
|
||||||
" Contains lots of sensible configurations, which I have in turn omitted from this file
|
" Contains lots of sensible configurations, which I have in turn omitted from this file
|
||||||
Plug 'tpope/vim-sensible'
|
Plug 'tpope/vim-sensible'
|
||||||
|
|
||||||
" Always enabled, non-language plugins
|
|
||||||
Plug 'tpope/vim-eunuch'
|
Plug 'tpope/vim-eunuch'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'tpope/vim-endwise'
|
Plug 'tpope/vim-endwise'
|
||||||
Plug 'w0rp/ale'
|
|
||||||
Plug 'morhetz/gruvbox'
|
|
||||||
Plug 'itchyny/lightline.vim'
|
Plug 'itchyny/lightline.vim'
|
||||||
Plug 'edkolev/tmuxline.vim'
|
Plug 'edkolev/tmuxline.vim'
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'junegunn/goyo.vim'
|
||||||
Plug 'junegunn/fzf'
|
Plug 'junegunn/fzf'
|
||||||
Plug 'autozimu/LanguageClient-neovim', {
|
|
||||||
\ 'branch': 'next',
|
|
||||||
\ 'do': 'bash install.sh',
|
|
||||||
\ }
|
|
||||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
|
||||||
|
|
||||||
|
|
||||||
" Conditionally loaded plugins
|
|
||||||
Plug 'tpope/vim-fugitive', { 'on': ['G', 'Git'], 'for': 'gitcommit' }
|
|
||||||
Plug 'mileszs/ack.vim', { 'on': 'Ack' }
|
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
||||||
Plug 'reedes/vim-pencil', { 'on': ['HardPencil', 'SoftPencil'] }
|
Plug 'reedes/vim-pencil', { 'on': ['HardPencil', 'SoftPencil'] }
|
||||||
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
|
|
||||||
|
|
||||||
" Language specific plugins
|
if !exists('g:vscode')
|
||||||
Plug 'dart-lang/dart-vim-plugin'
|
Plug 'morhetz/gruvbox'
|
||||||
Plug 'elixir-editors/vim-elixir'
|
Plug 'w0rp/ale'
|
||||||
Plug 'georgewitteman/vim-fish'
|
Plug 'autozimu/LanguageClient-neovim', {
|
||||||
Plug 'fatih/vim-go'
|
\ 'branch': 'next',
|
||||||
Plug 'jparise/vim-graphql'
|
\ 'do': 'bash install.sh',
|
||||||
Plug 'pangloss/vim-javascript'
|
\ }
|
||||||
Plug 'vim-ruby/vim-ruby'
|
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
Plug 'cespare/vim-toml'
|
|
||||||
Plug 'OmniSharp/omnisharp-vim'
|
Plug 'tpope/vim-fugitive', { 'on': ['G', 'Git'], 'for': 'gitcommit' }
|
||||||
Plug 'HerringtonDarkholme/yats.vim'
|
Plug 'mileszs/ack.vim', { 'on': 'Ack' }
|
||||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
Plug 'ionide/Ionide-vim'
|
Plug 'mcchrish/nnn.vim', { 'on': 'NnnPicker' }
|
||||||
Plug 'b4b4r07/vim-hcl'
|
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
|
||||||
Plug 'hashivim/vim-terraform'
|
|
||||||
Plug 'PProvost/vim-ps1'
|
" Language specific plugins
|
||||||
Plug 'vmchale/dhall-vim'
|
Plug 'dart-lang/dart-vim-plugin'
|
||||||
|
Plug 'elixir-editors/vim-elixir'
|
||||||
|
Plug 'georgewitteman/vim-fish'
|
||||||
|
Plug 'fatih/vim-go'
|
||||||
|
Plug 'jparise/vim-graphql'
|
||||||
|
Plug 'pangloss/vim-javascript'
|
||||||
|
Plug 'vim-ruby/vim-ruby'
|
||||||
|
Plug 'cespare/vim-toml'
|
||||||
|
Plug 'OmniSharp/omnisharp-vim'
|
||||||
|
Plug 'HerringtonDarkholme/yats.vim'
|
||||||
|
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||||
|
Plug 'ionide/Ionide-vim'
|
||||||
|
Plug 'b4b4r07/vim-hcl'
|
||||||
|
Plug 'hashivim/vim-terraform'
|
||||||
|
Plug 'PProvost/vim-ps1'
|
||||||
|
Plug 'vmchale/dhall-vim'
|
||||||
|
endif
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ nmap <leader>c <Plug>(lcn-code-lens-action)
|
||||||
nmap <leader>d <Plug>(lcn-explain-error)
|
nmap <leader>d <Plug>(lcn-explain-error)
|
||||||
nnoremap <leader>ls :LanguageClientStop<cr>
|
nnoremap <leader>ls :LanguageClientStop<cr>
|
||||||
nnoremap <leader>ll :LanguageClientStart<cr>
|
nnoremap <leader>ll :LanguageClientStart<cr>
|
||||||
nnoremap <leader>n :NERDTreeToggle<cr>
|
nnoremap <leader>n :NnnPicker<cr>
|
||||||
nnoremap <leader>p :FZF<cr>
|
nnoremap <leader>p :FZF<cr>
|
||||||
nnoremap <leader>a :Ack<cr>
|
nnoremap <leader>a :Ack<cr>
|
||||||
nnoremap <leader>we :VimwikiAll2HTML<cr>
|
nnoremap <leader>we :VimwikiAll2HTML<cr>
|
||||||
|
@ -109,6 +110,7 @@ let g:LanguageClient_serverCommands = {
|
||||||
\ 'typescript': ['typescript-language-server', '--stdio'],
|
\ 'typescript': ['typescript-language-server', '--stdio'],
|
||||||
\ 'typescript.tsx': ['typescript-language-server', '--stdio'],
|
\ 'typescript.tsx': ['typescript-language-server', '--stdio'],
|
||||||
\ 'elixir': ['~/code/elixir-lsp/elixir-ls/bin/language_server.sh'],
|
\ 'elixir': ['~/code/elixir-lsp/elixir-ls/bin/language_server.sh'],
|
||||||
|
\ 'eelixir': ['~/code/elixir-lsp/elixir-ls/bin/language_server.sh'],
|
||||||
\ 'go': ['gopls'],
|
\ 'go': ['gopls'],
|
||||||
\ 'fsharp': ['dotnet', '~/code/fsprojects/fsharp-language-server/bin/FSharpLanguageServer.dll'],
|
\ 'fsharp': ['dotnet', '~/code/fsprojects/fsharp-language-server/bin/FSharpLanguageServer.dll'],
|
||||||
\ 'dhall': ['dhall-lsp-server'],
|
\ 'dhall': ['dhall-lsp-server'],
|
||||||
|
@ -169,6 +171,9 @@ let g:pencil#map#suspend_af = 'K'
|
||||||
|
|
||||||
let g:vimwiki_list = [{'path': expand('~/.wiki/')}]
|
let g:vimwiki_list = [{'path': expand('~/.wiki/')}]
|
||||||
|
|
||||||
|
let g:nnn#layout = {'left': '~20%'}
|
||||||
|
let g:nnn#command = 'nnn -eHo'
|
||||||
|
|
||||||
augroup ft_jsx
|
augroup ft_jsx
|
||||||
au!
|
au!
|
||||||
autocmd BufNewFile,BufRead *.jsx set filetype=javascript.jsx
|
autocmd BufNewFile,BufRead *.jsx set filetype=javascript.jsx
|
||||||
|
|
|
@ -62,6 +62,7 @@ function provision_terminal_env -d 'Install base terminal utilities and sync con
|
||||||
curl \
|
curl \
|
||||||
kitty-terminfo \
|
kitty-terminfo \
|
||||||
fzf \
|
fzf \
|
||||||
|
nnn
|
||||||
|
|
||||||
set -l arch_pkgs \
|
set -l arch_pkgs \
|
||||||
$base_pkgs \
|
$base_pkgs \
|
||||||
|
|
Loading…
Reference in New Issue