More mature vim setup

This commit is contained in:
Nathan Schneider
2025-01-06 12:51:05 -07:00
parent d1f3961632
commit 7a7fc7d6f1
5 changed files with 43 additions and 16 deletions
+5 -2
View File
@@ -1,8 +1,10 @@
# Custom aliases for ntnsndr
# Be sure this is referred to in .bashrc
set -o vi
# More or less permanent file aliases:
alias Proximate='emacs ~/Cloud/Notes/Proximate.md'
alias Proximate='nvim ~/Cloud/Notes/Proximate.md'
alias Finances='less ~/Cloud/Current/School/Finances.md'
# More or less permanent directory aliases:
@@ -20,13 +22,14 @@ alias cv='~/.scripts/cv.sh'
alias dotupdate='git fetch --all && git reset --hard origin/master'
alias pandout='~/.scripts/pandout.sh'
alias pandorm='rm -rf output'
alias panda='~/.scripts/panda.sh'
# Hopefully temporary utility aliases:
alias paren='xmodmap -e "keycode 81=9 parenleft"'
# More or less permanent utility aliases:
alias emacs='emacs -nw'
alias editalias='emacs ~/.bash_aliases'
alias editalias='nvim ~/.bash_aliases'
alias open='xdg-open'
alias rm='rm -i'
alias search='grep -i'
+4
View File
@@ -28,6 +28,10 @@ sudo pacman -S emacs
sudo pacman -S aspell-en # English dictionary
emacs --script ~/.scripts/install-emacs.el
# nvim
sudo pacman -S neovim
~/.scripts/install-vim.sh
# pandoc
sudo pacman -S pandoc
sudo pacman -S texlive-core
+4
View File
@@ -18,6 +18,10 @@ sudo apt -y install emacs-gtk
sudo apt -y install aspell aspell-en
emacs --script ~/.scripts/install-emacs.el
# nvim
sudo apt -y install neovim
~/.scripts/install-vim.sh
# pandoc
sudo apt -y install texlive
sudo apt -y install texlive-latex-extra
+3 -4
View File
@@ -1,5 +1,4 @@
# TODO have to clarify how to set the location of the .vimrc file
# Set up nvim
# create symbolic link to the .vimrc
mkdir -p ~/.config/nvim
@@ -9,5 +8,5 @@ ln -s ~/.vimrc ~/.config/nvim/init.vim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# TODO have to make sure to install the plugins
# install plugins
nvim -c "PlugInstall" -c "q"
+26 -9
View File
@@ -3,22 +3,39 @@
" Basics
syntax on
set noerrorbells
set tabstop=4 softtabstop=4
set linebreak
set wrap
nnoremap <F5> :set linebreak<CR>
nnoremap <C-F5> :set nolinebreak<CR>
set incsearch
set spell
" Line wrapping in Markdown files
autocmd FileType markdown setlocal linebreak
autocmd FileType markdown noremap j gj
autocmd FileType markdown noremap k gk
" Tabs
set tabstop=4
set shiftwidth=4
set expandtab
"Search
set ic
set smartcase
set incsearch
" Workspace location
let g:workspace_session_directory = $HOME . '/.vim/sessions/'
" Set shell to bash
set shell=bash\ -l
" Shortcuts
command! Proximate :e ~/Cloud/Notes/Proximate.md
" Create panda command for pandout
command! -nargs=1 Panda :!~/.scripts/panda.sh % <args>
" Plugins
call plug#begin()
"Plug 'plasticboy/vim-markdown'
Plug 'junegunn/goyo.vim'
Plug 'reedes/vim-pencil'
Plug 'vim-pandoc/vim-pandoc'
"Plug 'plasticboy/vim-markdown'
"Plug 'vim-pandoc/vim-pandoc'
"Plug 'vim-pandoc/vim-pandoc-syntax'
call plug#end()