commit b7784930f20c693faf0a644273b8081d090e280d
parent de4f21e8595c3ff4011bfbfbd1c8908d3cab475c
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Mon, 13 Jan 2020 14:05:41 +0100
added bash config
Former-commit-id: ae33546f8b0ae5d895f7cdc72d7a404741e4fedc
Diffstat:
4 files changed, 23 insertions(+), 303 deletions(-)
diff --git a/dot.map b/dot.map
@@ -97,6 +97,8 @@ shell:
- functions: ~/.functions
- zprofile: ~/.zprofile
- zshrc: ~/.zshrc
+- bash_profile: ~/.bash_profile
+- bashrc: ~/.bashrc
# Vim config
vim:
diff --git a/shell/bash_profile b/shell/bash_profile
@@ -0,0 +1 @@
+. $HOME/.profile
diff --git a/shell/bashrc b/shell/bashrc
@@ -0,0 +1,20 @@
+. $HOME/.dotfiles/shell/z/z.sh
+[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
+[[ -f ~/.aliases ]] && source ~/.aliases
+[[ -f ~/.functions ]] && source ~/.functions
+
+# don't put duplicate lines or lines starting with space in the history.
+# See bash(1) for more options
+HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000
+HISTFILESIZE=2000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
diff --git a/vim/vimrc b/vim/vimrc
@@ -1,308 +1,5 @@
" vim: foldmethod=marker foldlevel=0
let mapleader=" " " Set the mapleader to be space
-" Plugins {{{
-" Installation {{{
-" Install vim-plug if needed
-if empty(glob('~/.vim/autoload/plug.vim'))
- silent execute "!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
- autocmd VimEnter * PlugInstall | source $MYVIMRC
-endif
-
-call plug#begin('~/.vim/plugged')
-
-" A color table with xterm color codes
-Plug 'guns/xterm-color-table.vim'
-
-" Simple commenting
-Plug 'tpope/vim-commentary'
-
-" Emmet but simpler
-Plug 'rstacruz/sparkup'
-
-" Endwise - smart do-end, if-fi, if-end, case-esac, etc.
-Plug 'tpope/vim-endwise'
-
-" Surround - super useful plugin for surrounding stuff with quotes/brackets/tags
-Plug 'tpope/vim-surround'
-
-" Eunuch - shell commands but in vim
-Plug 'tpope/vim-eunuch'
-
-" A tag overview on the right side
-Plug 'majutsushi/tagbar'
-
-" Personal hypertext files
-Plug 'vimwiki/vimwiki'
-
-" Git wrapper from tpope
-Plug 'tpope/vim-fugitive'
-
-" Undo tree visualiser
-Plug 'simnalamburt/vim-mundo'
-
-" Quickfix window mappings
-Plug 'romainl/vim-qf'
-
-" Repeat everything with '.'
-Plug 'tpope/vim-repeat'
-
-" Distraction-free editing
-Plug 'junegunn/goyo.vim'
-
-" Better CSV editing
-Plug 'chrisbra/csv.vim'
-
-" Display ANSI color codes
-Plug 'vim-scripts/AnsiEsc.vim'
-
-" Disable hlsearch after finished searching
-Plug 'romainl/vim-cool'
-
-" Vim + latex
-Plug 'lervag/vimtex'
-
-" Snippets
-Plug 'SirVer/ultisnips'
-
-" Improve K
-Plug 'gastonsimone/vim-dokumentary'
-
-" Open devdocs for a keyword
-Plug 'romainl/vim-devdocs'
-
-" Fuzzy finder in vim
-Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
-Plug 'junegunn/fzf.vim'
-
-" Better abbrevation and substitution
-Plug 'tpope/vim-abolish'
-
-" An improved grep
-Plug 'rking/ag.vim'
-
-" Highlight hex colors
-Plug 'chrisbra/colorizer'
-
-" Pywal scheme in vim
-Plug 'dylanaraps/wal.vim'
-
-" Documentation skeleton generator
-Plug 'kkoomen/vim-doge'
-
-" Show git changes in the sign column
-Plug 'airblade/vim-gitgutter'
-
-" Bracket bindings for filetypes
-Plug 'arp242/jumpy.vim'
-
-" Substitute preview
-Plug 'markonm/traces.vim'
-
-" Omnifuncs
-Plug 'myhere/vim-nodejs-complete'
-Plug 'othree/html5.vim'
-Plug 'vim-scripts/OmniCppComplete'
-Plug 'vim-scripts/pythoncomplete'
-
-" Alignment
-Plug 'junegunn/vim-easy-align'
-"
-" Peek contents of registers
-Plug 'junegunn/vim-peekaboo'
-
-" Latex symbol to unicode
-Plug 'joom/latex-unicoder.vim'
-
-" Smooth ^U/^D scrolling
-Plug 'psliwka/vim-smoothie'
-
-" Markdown support
-Plug 'plasticboy/vim-markdown'
-call plug#end()
-" }}}
-" Config {{{
-" Tagbar {{{
-" Maps
-nnoremap <leader>tt :TagbarToggle<CR>
-nnoremap <leader>to :TagbarOpen fj<CR>
-
-" tagbar language definitions
-let g:tagbar_type_vimwiki = {
- \ 'ctagstype':'vimwiki'
- \ , 'kinds':['h:header']
- \ , 'sro':'&&&'
- \ , 'kind2scope':{'h':'header'}
- \ , 'sort':0
- \ , 'ctagsbin':'vwtags.py'
- \ , 'ctagsargs': 'default'
- \ }
-
-let g:tagbar_type_go = {
- \ 'ctagstype' : 'go',
- \ 'kinds' : [
- \ 'p:package',
- \ 'i:imports:1',
- \ 'c:constants',
- \ 'v:variables',
- \ 't:types',
- \ 'n:interfaces',
- \ 'w:fields',
- \ 'e:embedded',
- \ 'm:methods',
- \ 'r:constructor',
- \ 'f:functions'
- \ ],
- \ 'sro' : '.',
- \ 'kind2scope' : {
- \ 't' : 'ctype',
- \ 'n' : 'ntype'
- \ },
- \ 'scope2kind' : {
- \ 'ctype' : 't',
- \ 'ntype' : 'n'
- \ },
- \ 'ctagsbin' : 'gotags',
- \ 'ctagsargs' : '-sort -silent'
- \ }
-let g:tagbar_type_markdown = {
- \ 'ctagstype' : 'markdown',
- \ 'kinds' : [
- \ 'c:Heading L1',
- \ 's:Heading L2',
- \ 'S:Heading L3',
- \ 't:Heading L4',
- \ 'T:Heading L5',
- \ 'u:Heading L6'
- \ ],
- \ 'sort': 0
- \ }
-
-let g:tagbar_type_scss = {
- \ 'ctagstype' : 'scss',
- \ 'kinds' : [
- \ 'm:Mixins',
- \ 'f:Functions',
- \ 'v:Variables',
- \ 'c:Classes',
- \ 'i:IDs',
- \ 't:Tags',
- \ 'd:Media',
- \ 'p:Placeholders'
- \ ],
- \ 'sort': 0
- \ }
-let g:tagbar_type_conf = {
- \ 'ctagstype' : 'lfrc',
- \ 'kinds' : [
- \ 'c:Commands',
- \ 'm:Maps'
- \ ],
- \ 'sort': 0
- \ }
-let g:tagbar_type_zsh = {
- \ 'ctagstype' : 'zsh',
- \ 'kinds' : [
- \ 's:Source scripts',
- \ 'e:Environment variables',
- \ 'f:Functions',
- \ 'm:Mappings'
- \ ],
- \ 'sort': 0
- \ }
-" }}}
-" Doge {{{
-let g:doge_mapping = '<leader>gd'
-" }}}
-" Goyo {{{
-let g:goyo_width = "80%"
-let g:goyo_height = "85%"
-" }}}
-" Vimtex {{{
-let g:tex_flavor='latex'
-let g:vimtex_view_method='general'
-let g:vimtex_quickfix_mode=0
-let g:tex_conceal='abdmg'
-" }}}
-" Ultisnips {{{
-let g:UltiSnipsExpandTrigger = '<tab>'
-let g:UltiSnipsJumpForwardTrigger = '<tab>'
-let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
-let g:UltiSnipsSnippetDirectories = [$DOTFILES.'/vim/ultisnips']
-let g:UltiSnipsEditSplit = "vertical"
-cabbrev USE UltiSnipsEdit
-" }}}
-" Dokumentary {{{
-" Improve what K does
-let g:dokumentary_docprgs = {'ruby': 'ri {0} | col -b'}
-" }}}
-" Abolish {{{
-" Work with variants of words easily
-let g:abolish_save_file = $DOTFILES.'/vim/abolish_save_file.vim'
-" }}}
-" Ag {{{
-nnoremap <leader>/ :Ag<space>
-" }}}
-" Fzf {{{
-set rtp+=~/.fzf
-let g:fzf_action = {
- \ 'ctrl-t': 'tab split',
- \ 'ctrl-i': 'split',
- \ 'ctrl-v': 'vsplit' }
-nnoremap <leader>F :Files<CR>
-nnoremap <leader>B :Buffers<CR>
-nnoremap <leader>G :Lines<CR>
-" }}}
-" Vimwiki {{{
-let tlist_vimwiki_settings = 'wiki;h:Headers'
-let g:vimwiki_table_mappings = 0 " avoid vimwiki conflict with Ultisnips
-
-let wiki = {}
-let wiki.path = '/Users/alex/Dropbox/vimwiki/'
-let wiki.path_html = '/Users/alex/Dropbox/vimwiki_html'
-let wiki.template_path = '/Users/alex/Dropbox/vimwiki/templates'
-let wiki.template_ext = '.tpl'
-let wiki.syntax = 'default'
-let wiki.ext = '.txt'
-let g:vimwiki_list = [wiki]
-let g:vimwiki_global_ext = 0
-let g:vimwiki_ext2syntax = {'.wiki': 'default'}
-" }}}
-" Sessions {{{
-nmap <leader>ss <Plug>SaveSession
-nmap <leader>sl <Plug>LoadSession
-nmap <leader>sd <Plug>DeleteSession
-nmap <leader>sq <Plug>CloseSession
-" }}}
-" Sparkup {{{
-let g:sparkupExecuteMapping = '<C-x><C-e><CR>'
-let g:sparkupNextMapping = '<C-x><C-e><tab>'
-" }}}
-" Haskell {{{
-let hs_highlight_delimiters = 1
-let hs_highlight_boolean = 1
-let hs_highlight_types = 1
-let hs_highlight_more_types = 1
-" }}}
-" EasyAlign {{{
-" Start interactive EasyAlign in visual mode (e.g. vipga)
-xmap ga <Plug>(EasyAlign)
-
-" Start interactive EasyAlign for a motion/text object (e.g. gaip)
-nmap ga <Plug>(EasyAlign)
-" }}}
-" Peekaboo {{{
-let g:peekaboo_compact=1
-" }}}
-" Mundo {{{
-nnoremap <leader>u :MundoToggle<CR>
-" }}}
-" Vim-qf {{{
-nmap <leader>qn <Plug>(qf_qf_next)
-nmap <leader>qp <Plug>(qf_qf_previous)
-nmap <leader>qf <Plug>(qf_qf_toggle)
-" }}}
-" }}}
-" }}}
" General {{{
" Set the colors
" Use true color