From 7f48ba04b4b0d3c91c799ea1e424fd9aa62a950a Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Thu, 19 Jan 2017 23:41:24 +0100 Subject: [PATCH] Cleanup Signed-off-by: Tomas Slusny --- .gitmodules | 3 -- README.md | 85 ++++++++++++++++++++++++---------- dotfiles/tmux.conf | 37 +++++++-------- dotfiles/vimrc | 68 +++++++++------------------ lib/bash/fzf | 2 +- lib/tmux/tmux-prefix-highlight | 1 - lib/vim/base16-vim | 2 +- 7 files changed, 102 insertions(+), 96 deletions(-) delete mode 160000 lib/tmux/tmux-prefix-highlight diff --git a/.gitmodules b/.gitmodules index 859f4cde..0639c0cd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,9 +46,6 @@ [submodule "lib/tmux/tmux-sensible"] path = lib/tmux/tmux-sensible url = https://github.com/tmux-plugins/tmux-sensible -[submodule "lib/tmux/tmux-prefix-highlight"] - path = lib/tmux/tmux-prefix-highlight - url = https://github.com/tmux-plugins/tmux-prefix-highlight [submodule "lib/tmux/tmux-resurrect"] path = lib/tmux/tmux-resurrect url = https://github.com/tmux-plugins/tmux-resurrect diff --git a/README.md b/README.md index 859b191f..5d41ac07 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ # dotfiles [![TravisCI Build Status](https://api.travis-ci.org/deathbeam/dotfiles.svg?branch=master)](https://travis-ci.org/deathbeam/dotfiles) -These are my configuration files for Linux and Mac. It is still work in progress, so expect a lot of changes, but I think it is stable enough to be usable. I put this README together, because I (like most of other programmers) do not have any life. I even added CI integration to this repo, because I was bored. Yes, you hear right, CI INTEGRATION TO FUCKING DOTFILES REPO. I doubt anyone will ever appreciate my effort, but [frankly, my dear, I don't give a damn](https://en.wikipedia.org/wiki/Frankly,_my_dear,_I_don't_give_a_damn). Expect a lot of changes in this repo, because most of the time I just cannot make up my mind, and I change my decisions very often. +These are my configuration files for Linux and Mac. It is still work in progress, so expect a lot of changes, but I +think it is stable enough to be usable. I put this README together, because I (like most of other programmers) do not +have any life. I even added CI integration to this repo, because I was bored. Yes, you hear right, CI INTEGRATION TO +FUCKING DOTFILES REPO. I doubt anyone will ever appreciate my effort, but [frankly, my dear, I don't give a +damn](https://en.wikipedia.org/wiki/Frankly,_my_dear,_I_don't_give_a_damn). Expect a lot of changes in this repo, +because most of the time I just cannot make up my mind, and I change my decisions very often. ## Requirements @@ -10,23 +15,47 @@ These are my configuration files for Linux and Mac. It is still work in progress ## Optional requirements -* bash - I am using bash, and my terminal configuration is working mostly for bash only. If you are using zsh, or fish or whatever, it's okay, I tried them all and eventually I came back to bash, mainly because some completion stuff I am using is a bit broken in other shells than bash. Otherwise, zsh is really great and if all this completion stuff was properly working there, I would be using zsh. -* [tmux](https://tmux.github.io/) - Terminal multiplexer. Awesome stuff, but I find myself to use it less and less, because I started using tiling window manager's features more. But still, tmux is really awesome, and have some great features what screen do not have. I have some really nice Tmux stuff in my repository, so feel free to try it, maybe you will like it. -* [vim](http://www.vim.org/download.php/) - Required for Vim stuff (of course). Needs to be installed with python support for all plugins to work correctly. If you are just starting with Vim, then I recommend you to run `vimtutor` from your CLI. Thank me later. -* [Firefox](https://www.mozilla.org/en-US/firefox/new/) - The only browser I found that can be properly styled to my likings (for example, doing what I did with my Firefox is with browsers like Chrome just not possible) and also allows me to watch porn in HD quality is Firefox. Just kidding, I don't watch porn. Also, has Vimperator. Install latest Firefox stable version, Vimperator do not works with Developer Edition. -* [vimperator](https://addons.mozilla.org/en-US/firefox/addon/vimperator/) - Vim for your firefox. It is really awesome, but if you prefer unmainained Pendactyl, then use it, or you want to have just Vi keybindings in your browser, but want to configure your browser through messsy JSON file or even worse, through setting menus (where you will need to use your mouse..) without possibility to store all these setting in nice dotfile repository, then use VimFX, you hipster. Otherwise, just use - Vimperator, what is currently the best one (if you are not using Firefox Developer Edition, because Vimperator is totally broken there, and it do not seems that Vimperator devs are making any progress on fixing these issues). -* [Stylish](https://addons.mozilla.org/en-US/firefox/addon/stylish/) - Just cool extension that can style your browser. I do not found nice solution how to store my custom Firefox style in some dotfile, so this is last thing I do not like in this setup, you need to install my style manually from Addon menu (yes, I know, it is horrible, but it is only way that is currently working and styles entire top menu properly on my Mac OS). -* [editorconfig](https://github.com/editorconfig/editorconfig-core-c/blob/master/INSTALL.md) - For editorconfig plugin. This is not necessary at all, but EditorConfig is super awesome portable thing to configure indentation and whitespace settings for your project, and it works in most of editors, not only in Vim. +* bash - I am using bash, and my terminal configuration is working mostly for bash only. If you are using zsh, or fish + or whatever, it's okay, I tried them all and eventually I came back to bash, mainly because some completion stuff I am + using is a bit broken in other shells than bash. Otherwise, zsh is really great and if all this completion stuff was + properly working there, I would be using zsh. +* [tmux](https://tmux.github.io/) - Terminal multiplexer. Awesome stuff, but I find myself to use it less and less, + because I started using tiling window manager's features more. But still, tmux is really awesome, and have some great + features what screen do not have. I have some really nice Tmux stuff in my repository, so feel free to try it, maybe + you will like it. +* [vim](http://www.vim.org/download.php/) - Required for Vim stuff (of course). Needs to be installed with python + support for all plugins to work correctly. If you are just starting with Vim, then I recommend you to run `vimtutor` + from your CLI. Thank me later. +* [Firefox](https://www.mozilla.org/en-US/firefox/new/) - The only browser I found that can be properly styled to my + likings (for example, doing what I did with my Firefox is with browsers like Chrome just not possible). Also, has + Vimperator. Install latest Firefox stable version, Vimperator do not works with Developer Edition. +* [vimperator](https://addons.mozilla.org/en-US/firefox/addon/vimperator/) - Vim for your firefox. No need to say more. +* [Stylish](https://addons.mozilla.org/en-US/firefox/addon/stylish/) - Just cool extension that can style your browser. + I do not found nice solution how to store my custom Firefox style in some dotfile, so this is last thing I do not like + in this setup, you need to install my style manually from Addon menu (yes, I know, it is horrible, but it is only way + that is currently working and styles entire top menu properly on my Mac OS). +* [editorconfig](https://github.com/editorconfig/editorconfig-core-c/blob/master/INSTALL.md) - For editorconfig plugin. + This is not necessary at all, but EditorConfig is super awesome portable thing to configure indentation and whitespace + settings for your project, and it works in most of editors, not only in Vim. ### macOS specific -* [kwm](https://github.com/koekeishiya/kwm) - Awesome tiling window manager for macOS. Noticed that I am using macOS instead of OSX? It is because Apple rebranded OSX to macOS in latest Sierra update. You can read more about it [here](https://techcrunch.com/2016/06/13/os-x-is-now-macos-and-gets-support-for-siri-auto-unlock-and-more/). Great stuff, right? Anyway, back to the point. Kwm is a lot better than Amethyst, if you are still using it. Are you asking why? Because it can be +* [kwm](https://github.com/koekeishiya/kwm) - Awesome tiling window manager for macOS. Noticed that I am using macOS + instead of OSX? It is because Apple rebranded OSX to macOS in latest Sierra update. You can read more about it + [here](https://techcrunch.com/2016/06/13/os-x-is-now-macos-and-gets-support-for-siri-auto-unlock-and-more/). Great + stuff, right? Anyway, back to the point. Kwm is a lot better than Amethyst, if you are still using it. Are you asking + why? Because it can be configured from dotfile, that is why. Also, it have nice focus borders, and is more similar to window managers on Linux, what I really miss on OSX, but I am not going to use XQuartz just to have i3 for my terminals here, lol. -* [khd](https://github.com/koekeishiya/khd) - Hotkey daemon for macOS, required to have keybindings in kwm. Originally these two was one project, but they got split, what is imo great thing. -* [karabiner-elements](https://github.com/tekezo/Karabiner-Elements) - Can remap our Caps-Lock key to Hyper key, what I am using in khd config as mod key for everything. You will need specifically [this build](https://cl.ly/hwJn/download/Karabiner-Elements-0.90.61.dmg) what have support for hyper key remapping. Rest of configuration that will remap caps lock to hyper is in dotfiles. -* [Alfred 3](https://www.alfredapp.com/) - Used as launcher application in my kwm/khd config. Not needed, you can just adjust keybindings in khdrc to use Spotlight, but Alfred is just too awesome to pass. -* [iTerm2](http://iterm2.com/) - It is better than Terminal, and supports 256 colors, instead of Terminal's 16. Also, it have no titlebar mode, what is great. And my macOS setup is configured to be working properly with iTerm2. +* [khd](https://github.com/koekeishiya/khd) - Hotkey daemon for macOS, required to have keybindings in kwm. Originally + these two was one project, but they got split, what is imo great thing. +* [karabiner-elements](https://github.com/tekezo/Karabiner-Elements) - Can remap our Caps-Lock key to Hyper key, what I + am using in khd config as mod key for everything. You will need specifically [this + build](https://cl.ly/hwJn/download/Karabiner-Elements-0.90.61.dmg) what have support for hyper key remapping. Rest of + configuration that will remap caps lock to hyper is in dotfiles. +* [Alfred 3](https://www.alfredapp.com/) - Used as launcher application in my kwm/khd config. Not needed, you can just + adjust keybindings in khdrc to use Spotlight, but Alfred is just too awesome to pass. +* [iTerm2](http://iterm2.com/) - It is better than Terminal, and supports 256 colors, instead of Terminal's 16. Also, it + have no titlebar mode, what is great. And my macOS setup is configured to be working properly with iTerm2. ## How to install? @@ -37,9 +66,9 @@ git clone https://github.com/deathbeam/dotfiles.git ~/.dotfiles && \ ~/.dotfiles/install ``` -I recommend to install [Hack](http://sourcefoundry.org/hack/) font. It is awesome for programming and runs in Vim really fast. I personally like DejaVu Sans Mono more, but it really slows down my Vim (for some unknown reason) so I am sticking to Hack. All my configurations tries to load Hack font if possible, otherwise they tries couple other good fonts and falls back to some common one if none is found. - -To install Firefox theme, use [Stylish](https://addons.mozilla.org/en-US/firefox/addon/stylish/) and enter this URL to `Install from URLs`: +These dotfiles are configured with [Terminus](http://terminus-font.sourceforge.net/) font in mind, so better install it. +To install Firefox theme, use [Stylish](https://addons.mozilla.org/en-US/firefox/addon/stylish/) and enter this URL to +`Install from URLs`: ``` https://raw.githubusercontent.com/deathbeam/dotfiles/master/lib/firefox/firefox.css @@ -53,7 +82,8 @@ You can use dottool --update ``` -what was made exactly for this. It will fetch latest changes from remote, then runs rebase and at end run installation script to update links and installed stuff. Or, if you want, you can use Git like this: +what was made exactly for this. It will fetch latest changes from remote, then runs rebase and at end run installation +script to update links and installed stuff. Or, if you want, you can use Git like this: ```shell @@ -80,7 +110,8 @@ vim $DOTHOME/usr/tmux.conf vim $DOTHOME/usr/gitconfig ``` -To add your own Vim plugin you can use `dottool --vim-plugin` command. For example to add [SuperTab](https://github.com/ervandew/supertab), all you need to do is run this command: +To add your own Vim plugin you can use `dottool --vim-plugin` command. For example to add +[SuperTab](https://github.com/ervandew/supertab), all you need to do is run this command: ```shell dottool --vim-plugin https://github.com/ervandew/supertab.git @@ -123,7 +154,6 @@ To see all helper commands, run `dottool --help`. ### Tmux * [tmux-sensible](https://github.com/tmux-plugins/tmux-sensible): basic tmux settings everyone can agree on - * [tmux-prefix-highlight](https://github.com/tmux-plugins/tmux-prefix-highlight): Visually shows different tmux modes (prefix, copy) * [tmux-yank](https://github.com/tmux-plugins/tmux-yank): Plugin for copying to system clipboard * [tmux-copycat](https://github.com/tmux-plugins/tmux-copycat): Enhances tmux search * [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Persists tmux environment across system restarts @@ -133,9 +163,14 @@ To see all helper commands, run `dottool --help`. ## Thanks to.. * [skwp/dotfiles](https://github.com/skwp/dotfiles) for some sane .gitignore config for ignoring Vim and ctags stuff - * [mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles) for sane .gitconfig and some things in .gitignore, and also for enabling Bash 4 features for tab completion if possible - * [amix/vimrc](https://github.com/amix/vimrc) for a lot of stuff in my vimrc. Without configurations, what are really nicely explained in that repo, I would be lost like forever + * [mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles) for sane .gitconfig and some things in + .gitignore, and also for enabling Bash 4 features for tab completion if possible + * [amix/vimrc](https://github.com/amix/vimrc) for a lot of stuff in my vimrc. Without configurations, what are really + nicely explained in that repo, I would be lost like forever * [twily](http://twily.info/) for his awesome Firefox stylish theme, what I configured to suit my needs - * [nerdbar.widget](https://github.com/herrbischoff/nerdbar.widget) for awesome widget for Ubersicht on what I based on mine - * [thoughtbot/dotfiles](https://github.com/thoughtbot/dotfiles) for some parts of tmux configuration. I also want to mention that I absolutely love their youtube channel - * I also found some things in other dotfile repositories (for example most of the great config in vimperatorrc), but I totally lost track, so sorry if I forgot to mention anyone here + * [nerdbar.widget](https://github.com/herrbischoff/nerdbar.widget) for awesome widget for Ubersicht on what I based on + mine + * [thoughtbot/dotfiles](https://github.com/thoughtbot/dotfiles) for some parts of tmux configuration. I also want to + mention that I absolutely love their youtube channel + * I also found some things in other dotfile repositories (for example most of the great config in vimperatorrc), but I + totally lost track, so sorry if I forgot to mention anyone here diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf index 2efcc44b..b711489b 100644 --- a/dotfiles/tmux.conf +++ b/dotfiles/tmux.conf @@ -69,29 +69,32 @@ # Style {{{ - set -g status-bg "colour18" + # Command bar + set -g message-command-bg "colour0" set -g message-command-fg "colour7" - set -g status-justify "left" - set -g status-left-length "100" - set -g status "on" - set -g pane-active-border-fg "colour4" set -g message-bg "colour0" - set -g status-right-length "100" - set -g status-right-attr "none" set -g message-fg "colour7" - set -g message-command-bg "colour18" - set -g status-attr "none" - set -g status-utf8 "on" set -g pane-border-fg "colour19" + set -g pane-active-border-fg "colour4" + + # Status line + set -g status-bg "colour18" + set -g status-fg "colour7" + set -g status-justify "left" + set -g status-attr "none" + set -g status-left-length "100" set -g status-left-attr "none" + set -g status-right-length "100" + set -g status-right-attr "none" + setw -g window-status-bg "colour18" setw -g window-status-fg "colour7" setw -g window-status-attr "none" + setw -g window-status-separator "" setw -g window-status-activity-bg "colour18" - setw -g window-status-activity-attr "none" setw -g window-status-activity-fg "colour4" - setw -g window-status-separator "" - setw -g window-status-bg "colour18" - set -g status-left "#{prefix_highlight}#[fg=colour18,bg=colour4,bold] #S #[fg=colour4,bg=colour18,nobold,nounderscore,noitalics]" + setw -g window-status-activity-attr "none" + + set -g status-left "#[fg=colour18,bg=colour4,bold] #S #[fg=colour4,bg=colour18,nobold,nounderscore,noitalics]" set -g status-right "#[fg=colour19,bg=colour18,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour19] %Y-%m-%d | %H:%M #[fg=colour4,bg=colour19,nobold,nounderscore,noitalics]#[fg=colour18,bg=colour4] #h " setw -g window-status-format "#[fg=colour7,bg=colour18] #I |#[fg=colour7,bg=colour18] #W " setw -g window-status-current-format "#[fg=colour18,bg=colour19,nobold,nounderscore,noitalics]#[fg=colour7,bg=colour19] #I |#[fg=colour7,bg=colour19] #W #[fg=colour19,bg=colour18,nobold,nounderscore,noitalics]" @@ -101,12 +104,6 @@ # Plugins {{{ run-shell "$DOTHOME/lib/tmux/tmux-sensible/sensible.tmux" - set -g @prefix_highlight_show_copy_mode 'on' - set -g @prefix_highlight_fg colour18 - set -g @prefix_highlight_copy_mode_attr 'fg=default,bg=colour16' - set -g @prefix_highlight_output_prefix ' ' - set -g @prefix_highlight_output_suffix ' ' - run-shell "$DOTHOME/lib/tmux/tmux-prefix-highlight/prefix_highlight.tmux" run-shell "$DOTHOME/lib/tmux/tmux-yank/yank.tmux" run-shell "$DOTHOME/lib/tmux/tmux-copycat/copycat.tmux" run-shell "$DOTHOME/lib/tmux/tmux-resurrect/resurrect.tmux" diff --git a/dotfiles/vimrc b/dotfiles/vimrc index c657b5cb..27259ded 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -21,6 +21,8 @@ " Enable filetype plugins filetype plugin on filetype indent on + runtime macros/matchit.vim + let loaded_matchparen = 1 " disable matchparen, can be really slow " time out for key codes set ttimeout @@ -51,9 +53,6 @@ set grepformat^=%f:%l:%c:%m endif - " Disable matchparen plugin (super slow sometimes) - let loaded_matchparen = 1 - " }}} " User interface {{{ @@ -126,9 +125,6 @@ " Show matching brackets when text indicator is over them set showmatch - " How many tenths of a second to blink when matching brackets - set mat=2 - " No annoying sound on errors set noerrorbells set novisualbell @@ -142,8 +138,17 @@ " Always show the status line set laststatus=2 - " Format the status line - set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c + " Status line format + set statusline= + set statusline +=%1*\ %n\ %* "buffer number + set statusline +=%5*%{&ff}%* "file format + set statusline +=%3*%y%* "file type + set statusline +=%4*\ %<%F%* "full path + set statusline +=%2*%m%* "modified flag + set statusline +=%1*%=%5l%* "current line + set statusline +=%2*/%L%* "total lines + set statusline +=%1*%4v\ %* "virtual column number + set statusline +=%2*0x%04B\ %* "character under cursor " We are using bash let g:is_bash=1 @@ -184,7 +189,7 @@ " Use Unix as the standard file type set ffs=unix,dos,mac - " Performance improvement + " Limit horizontal and vertical syntax rendering syntax sync minlines=256 set synmaxcol=256 @@ -192,23 +197,10 @@ autocmd BufEnter * highlight ColorColumn ctermbg=darkred ctermfg=white autocmd BufEnter * call matchadd('ColorColumn', '\%121v', 100) "set column nr - -" }}} - -" Statusline {{{ - set statusline= - set statusline +=%1*\ %n\ %* "buffer number - set statusline +=%5*%{&ff}%* "file format - set statusline +=%3*%y%* "file type - set statusline +=%4*\ %<%F%* "full path - set statusline +=%2*%m%* "modified flag - set statusline +=%1*%=%5l%* "current line - set statusline +=%2*/%L%* "total lines - set statusline +=%1*%4v\ %* "virtual column number - set statusline +=%2*0x%04B\ %* "character under cursor " }}} " Text, tab and indent related {{{ + " Search down into subfolders " Provides tab-completion for all file-related tasks set path+=** @@ -232,16 +224,15 @@ set smarttab " 1 tab == 2 spaces - set shiftwidth=4 - set tabstop=4 + set shiftwidth=2 + set tabstop=2 - " Linebreak on 500 characters - set lbr - set tw=500 + " Text width is 120 characters + set textwidth=120 - set ai "Auto indent - set si "Smart indent - set wrap "Wrap lines + " Better automatic indentation + set autoindent + set smartindent " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler @@ -293,19 +284,6 @@ " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd - " Don't use Ex mode, use Q for formatting. - " Revert with ":unmap Q". - map Q gq - - " Make capital yank work like other capital letters - nnoremap Y y$ - - " Pressing ,ss will toggle and untoggle spell checking - map ss :setlocal spell! - - " Toggle paste mode on and off - map pp :setlocal paste! - " Clear last search highlight map :noh @@ -341,12 +319,12 @@ command! W w !sudo tee % > /dev/null " Sane pasting - command! Paste call SmartPaste() function! SmartPaste() setl paste normal "+p setl nopaste endfunction + command! Paste call SmartPaste() " Show numbers, folds and git diff signs on left function! Info() diff --git a/lib/bash/fzf b/lib/bash/fzf index 7ef0e505..8ac37d59 160000 --- a/lib/bash/fzf +++ b/lib/bash/fzf @@ -1 +1 @@ -Subproject commit 7ef0e50507e3896edc1b624d5ea5e73b7fac3506 +Subproject commit 8ac37d59278209a7aec536f319c26109ef6704eb diff --git a/lib/tmux/tmux-prefix-highlight b/lib/tmux/tmux-prefix-highlight deleted file mode 160000 index 34f7125a..00000000 --- a/lib/tmux/tmux-prefix-highlight +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 34f7125ae46e5123bedad03e08027332d1186186 diff --git a/lib/vim/base16-vim b/lib/vim/base16-vim index de0afc26..09c3fbb0 160000 --- a/lib/vim/base16-vim +++ b/lib/vim/base16-vim @@ -1 +1 @@ -Subproject commit de0afc260840304719856b257c007d8d0df32655 +Subproject commit 09c3fbb0edf5b40bf13177b487640106f832652d