mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
vim no longer uses spf13
This commit is contained in:
parent
76189d8ad6
commit
2ed3e093da
50
README.org
50
README.org
@ -7,11 +7,18 @@
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#applications][Applications]]
|
||||
- [[#configured-applications][Configured Applications]]
|
||||
- [[#zsh][Zsh]]
|
||||
- [[#theme][Theme]]
|
||||
- [[#plugin-manager][Plugin Manager]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#neovim][Neovim]]
|
||||
- [[#theme-1][Theme]]
|
||||
- [[#plugin-manager-1][Plugin Manager]]
|
||||
- [[#plugins-1][Plugins]]
|
||||
- [[#general][General]]
|
||||
- [[#programming][Programming]]
|
||||
- [[#ui][UI]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#installation][Installation]]
|
||||
- [[#find--delete-orphaned-symlinks][Find & delete orphaned symlinks]]
|
||||
@ -25,8 +32,9 @@ A repository of my personal configuration files.
|
||||
|
||||
* Prerequisites
|
||||
- [[http://www.gnu.org/software/stow/][stow]]
|
||||
- [[https://www.python.org/][Python]]
|
||||
|
||||
* Applications
|
||||
* Configured Applications
|
||||
- [[https://github.com/alacritty/][alacritty]]
|
||||
- [[https://brave.com/][brave]]
|
||||
- [[https://github.com/baskerville/bspwm][bspwm]]
|
||||
@ -73,12 +81,44 @@ A repository of my personal configuration files.
|
||||
- [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]]
|
||||
- [[https://github.com/zsh-users/zsh-syntax-highlighting][zsh-syntax-highlighting]]
|
||||
|
||||
* Neovim
|
||||
** Theme
|
||||
- [[https://github.com/morhetz/gruvbox][gruvbox]]
|
||||
** Plugin Manager
|
||||
- [[https://github.com/junegunn/vim-plug][vim-plug]]
|
||||
** Plugins
|
||||
*** General
|
||||
- [[https://github.com/bling/vim-bufferline][bling/vim-bufferline]]
|
||||
- [[easymotion/vim-easymotion]]
|
||||
- [[https://github.com/farmergreg/vim-lastplace][farmergreg/vim-lastplace]]
|
||||
- [[https://github.com/jiangmiao/auto-pairs][jiangmiao/auto-pairs]]
|
||||
- [[https://github.com/kien/ctrlp.vim][kien/ctrlp.vim]]
|
||||
- [[https://github.com/mbbill/undotree][mbbill/undotree]]
|
||||
- [[https://github.com/mhinz/vim-signify][mhinz/vim-signify]]
|
||||
- [[https://github.com/myusuf3/numbers.vim][myusuf3/numbers.vim]]
|
||||
- [[https://github.com/nathanaelkane/vim-indent-guides][nathanaelkane/vim-indent-guides]]
|
||||
- [[https://github.com/preservim/nerdtree][preservim/nerdtree]]
|
||||
- [[https://github.com/rhysd/conflict-marker.vim][rhysd/conflict-marker.vim]]
|
||||
- [[https://github.com/terryma/vim-multiple-cursors][terryma/vim-multiple-cursors]]
|
||||
- [[https://github.com/tpope/vim-abolish][tpope/vim-abolish]]
|
||||
- [[https://github.com/tpope/vim-surround][tpope/vim-surround]]
|
||||
- [[https://github.com/vim-airline/vim-airline][vim-airline/vim-airline]]
|
||||
*** Programming
|
||||
- [[https://github.com/autozimu/LanguageClient-neovim][autozimu/LanguageClient-neovim]]
|
||||
- [[https://github.com/godlygeek/tabular][godlygeek/tabular]]
|
||||
- [[https://github.com/majutsushi/tagbar][majutsushi/tagbar]]
|
||||
- [[https://github.com/preservim/nerdcommenter][preservim/nerdcommenter]]
|
||||
- [[https://github.com/Shougo/deoplete.nvim][Shougo/deoplete.nvim]]
|
||||
- [[https://github.com/tpope/vim-fugitive][tpope/vim-fugitive]]
|
||||
- [[https://github.com/Xuyuanp/nerdtree-git-plugin][Xuyuanp/nerdtree-git-plugin]]
|
||||
*** UI
|
||||
- [[https://github.com/morhetz/gruvbox][morhetz/gruvbox]]
|
||||
- [[https://github.com/ryanoasis/vim-devicons][ryanoasis/vim-devicons]]
|
||||
|
||||
* Configuration
|
||||
** Installation
|
||||
#+BEGIN_SRC shell
|
||||
./install.sh
|
||||
update-desktop-database ~/.local/share/applications/
|
||||
xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol
|
||||
./install
|
||||
#+END_SRC
|
||||
** Find & delete orphaned symlinks
|
||||
#+BEGIN_SRC shell
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
find ~ -type l -exec test ! -e {} \; -delete
|
||||
|
19
install
19
install
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env zsh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# We need the environment to be able to symlink files accordingly
|
||||
case "$1" in
|
||||
@ -15,6 +15,23 @@ for d in $(find -- */ -maxdepth 0 -type d | cut -f1 -d '/'); do
|
||||
(stow -t "$HOME" "$d")
|
||||
done
|
||||
|
||||
# Refresh xgd
|
||||
update-desktop-database ~/.local/share/applications/
|
||||
xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol
|
||||
|
||||
# Install vim plugins & requirements
|
||||
if [ ! "$(pip list --user | grep 'pynvim' | wc -l)" -ge 1 ]; then
|
||||
pip install --user pynvim
|
||||
fi
|
||||
nvim +PlugInstall +qall
|
||||
|
||||
# Create nvim config directory if it doesn't exist
|
||||
if [ ! -d ~/.config/nvim ]; then
|
||||
echo "Creating ~/.config/nvim"
|
||||
mkdir -p ~/.config/nvim
|
||||
fi
|
||||
|
||||
# Notify user to manually symlink files
|
||||
if [ ! -z "$EXTENSION" ]; then
|
||||
echo "\n\nDon't forget to symlink these files:\n\n"
|
||||
find ~ \( -type l -o -type f \) -name "*.$EXTENSION" -exec ls -al {} \;
|
||||
|
@ -1,3 +1,159 @@
|
||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||
let &packpath = &runtimepath
|
||||
source ~/.vimrc
|
||||
" Modeline and Notes {
|
||||
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
|
||||
"
|
||||
" __ __ __ ___
|
||||
" | \/ |_ _ \ \ / (_)_ __ ___ _ __ ___
|
||||
" | |\/| | | | | \ \ / /| | '_ ` _ \| '__/ __|
|
||||
" | | | | |_| | \ V / | | | | | | | | | (__
|
||||
" |_| |_|\__, | \_/ |_|_| |_| |_|_| \___|
|
||||
" |___/
|
||||
" }
|
||||
|
||||
" Installed Plugins {
|
||||
call plug#begin()
|
||||
|
||||
" General {
|
||||
Plug 'bling/vim-bufferline'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
Plug 'farmergreg/vim-lastplace'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'kien/ctrlp.vim'
|
||||
Plug 'mbbill/undotree'
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'myusuf3/numbers.vim'
|
||||
Plug 'nathanaelkane/vim-indent-guides'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'rhysd/conflict-marker.vim'
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
Plug 'tpope/vim-abolish'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
" }
|
||||
|
||||
|
||||
" Programming {
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
\ 'do': 'bash install.sh',
|
||||
\ }
|
||||
Plug 'godlygeek/tabular'
|
||||
if executable('ctags')
|
||||
Plug 'majutsushi/tagbar'
|
||||
endif
|
||||
Plug 'preservim/nerdcommenter'
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
" }
|
||||
|
||||
" UI {
|
||||
Plug 'morhetz/gruvbox'
|
||||
" This has to be loaded last to work
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
" }
|
||||
call plug#end()
|
||||
" }
|
||||
|
||||
" General {
|
||||
colorscheme gruvbox " Set colour scheme
|
||||
set clipboard=unnamed,unnamedplus " Use + register for copy-paste
|
||||
|
||||
set mouse=a " Automatically enable mouse usage
|
||||
set mousehide " Hide the mouse cursor while typing
|
||||
|
||||
autocmd BufEnter * if bufname("") !~ "^\[A-Za-z0-9\]*://" | lcd %:p:h | endif " Always switch to the current file directory
|
||||
|
||||
set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter')
|
||||
set virtualedit=onemore " Allow for cursor beyond last character
|
||||
set hidden " Allow buffer switching without saving
|
||||
set iskeyword-=. " '.' is an end of word designator
|
||||
set iskeyword-=# " '#' is an end of word designator
|
||||
set iskeyword-=- " '-' is an end of word designator
|
||||
" }
|
||||
|
||||
" Vim UI {
|
||||
set cursorline " show cursor line
|
||||
|
||||
highlight clear SignColumn " SignColumn should match background
|
||||
highlight clear LineNr " Current line number row will have same background color in relative mode
|
||||
|
||||
set ignorecase " Ignore case on search
|
||||
set scrolljump=5 " Lines to scroll when cursor leaves screen
|
||||
set scrolloff=3 " Minimum lines to keep above and below cursor
|
||||
set foldenable " Auto fold code
|
||||
set list " Display whitespace
|
||||
" }
|
||||
|
||||
" Formatting {
|
||||
set shiftwidth=4 " Use indents of 4 spaces
|
||||
set expandtab " Tabs are spaces, not tabs
|
||||
set tabstop=4 " An indentation every four columns
|
||||
set softtabstop=4 " Let backspace delete indent
|
||||
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
|
||||
set splitright " Puts new vsplit windows to the right of the current
|
||||
set splitbelow " Puts new split windows to the bottom of the current
|
||||
set pastetoggle=<F12> " pastetoggle (sane indentation on pastes)
|
||||
" }
|
||||
|
||||
" Key Mappings {
|
||||
" Switch between different windows by their direction
|
||||
no <C-j> <C-w>j| "switching to below window
|
||||
no <C-k> <C-w>k| "switching to above window
|
||||
no <C-l> <C-w>l| "switching to right window
|
||||
no <C-h> <C-w>h| "switching to left window
|
||||
|
||||
" More convenient leaders
|
||||
let mapleader = ","
|
||||
let maplocalleader = '_'
|
||||
|
||||
" Visual shifting (does not exit Visual mode)
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" For when you forget to sudo.. Really Write the file.
|
||||
cmap w!! w !sudo tee % >/dev/null
|
||||
" }
|
||||
|
||||
" Plugin Configuration {
|
||||
" NerdTree {
|
||||
" Start nerdtree automatically when no files are specified
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||
|
||||
" Don't open nerdtree when opening session file
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") && v:this_session == "" | NERDTree | endif
|
||||
|
||||
" Start nerdtree automatically when opening up a directory
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
|
||||
|
||||
" Close vim if only windo left is nerdtree
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
|
||||
" Toggle nerdtree
|
||||
map <C-e> :NERDTreeToggle<CR>
|
||||
" }
|
||||
|
||||
" Tagbar {
|
||||
if executable('ctags')
|
||||
" Tagbar panel
|
||||
map <Leader>tt :TagbarToggle<CR>
|
||||
endif
|
||||
" }
|
||||
|
||||
" NerdCommenter {
|
||||
" Add spaces after comment delimiters by default
|
||||
let g:NERDSpaceDelims = 1
|
||||
" }
|
||||
|
||||
" Airline {
|
||||
" Enable powerline fonts
|
||||
let g:airline_powerline_fonts=1
|
||||
" }
|
||||
|
||||
" Deoplete {
|
||||
" Load deoplete on startup
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
" }
|
||||
" }
|
||||
|
@ -1,2 +0,0 @@
|
||||
let g:airline_powerline_fonts=1
|
||||
let g:airline_theme='molokai'
|
@ -1,4 +0,0 @@
|
||||
Bundle 'ryanoasis/vim-devicons'
|
||||
Bundle 'shime/vim-livedown'
|
||||
UnBundle 'amirh/HTML-AutoCloseTag'
|
||||
UnBundle 'spf13/vim-preview'
|
@ -1,13 +0,0 @@
|
||||
color gruvbox
|
||||
|
||||
" vim-devicons
|
||||
set encoding=utf8
|
||||
|
||||
" mutt
|
||||
au BufRead ~/.mutt/temp/mutt-* set tw=72
|
||||
|
||||
" default previe browser
|
||||
let g:livedown_browser='firefox-developer-edition --class="firefox-developer"'
|
||||
|
||||
" toggle markdown preview
|
||||
nmap <leader>P :LivedownToggle<CR>
|
@ -46,8 +46,8 @@ fi
|
||||
zplug load
|
||||
|
||||
# vim alias
|
||||
alias vim="nvim"
|
||||
alias vi="nvim"
|
||||
alias v="nvim"
|
||||
alias sv="sudo nvim"
|
||||
|
||||
# ls alias
|
||||
alias ls="exa"
|
||||
|
Loading…
Reference in New Issue
Block a user