From 90c6d8355e8601d132cb722e75075dadcfb1b31a Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sun, 2 Apr 2017 03:59:24 +0200 Subject: [PATCH] Add codi.vim, correct Makefile formatting Signed-off-by: Tomas Slusny --- .editorconfig | 4 +++ .gitmodules | 3 +++ Makefile | 1 + README.md | 2 ++ editorconfig/.editorconfig | 4 +++ vim/.vim/bundle/codi.vim | 1 + vim/.vim/ftplugin/make.vim | 3 +++ x11/.xinitrc | 46 +++++++++++++++++++++------------ zsh/.zsh/bundle/codi.plugin.zsh | 13 ++++++++++ 9 files changed, 60 insertions(+), 17 deletions(-) create mode 160000 vim/.vim/bundle/codi.vim create mode 100644 vim/.vim/ftplugin/make.vim create mode 100644 zsh/.zsh/bundle/codi.plugin.zsh diff --git a/.editorconfig b/.editorconfig index 9d08a1a8..f1a24789 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,7 @@ indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +[Makefile] +indent_style = tab +indent_size = 8 diff --git a/.gitmodules b/.gitmodules index 8d118399..02e256b3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -119,3 +119,6 @@ [submodule "vim/.vim/bundle/completor.vim"] path = vim/.vim/bundle/completor.vim url = https://github.com/maralla/completor.vim +[submodule "vim/.vim/bundle/codi.vim"] + path = vim/.vim/bundle/codi.vim + url = https://github.com/metakirby5/codi.vim diff --git a/Makefile b/Makefile index cd289ab1..8eed1d6b 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ clean: find ~ -xtype l -delete install: + touch /tmp/cmd && chmod u+x /tmp/cmd ~/.fzf/install --all --no-update-rc link: diff --git a/README.md b/README.md index 89065184..c1a8a91b 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ git clone git://github.com/Tarrasch/zsh-autoenv ~/.zsh/bundle/local/zsh-autoenv * [alias-tips](https://github.com/djui/alias-tips): A plugin to help remembering those aliases you defined once * [base-16-shell](https://github.com/chriskempson/base16-shell): A shell script to change your shell's default ANSI colors but most importantly, colors 17 to 21 of your shell's 256 colorspace (if supported by your terminal) * [cdls](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/cdls.plugin.zsh): Runs `ls -A` on directory change + * [codi](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/codi.plugin.zsh): A nice way to use Codi is through a shell wrapper * [fzf](https://github.com/junegunn/fzf): A command-line fuzzy finder written in Go * [globalias](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/globalias.plugin.zsh): Expands all glob expressions, subcommands and aliases (including global) @@ -77,6 +78,7 @@ git clone git://github.com/Tarrasch/zsh-autoenv ~/.zsh/bundle/local/zsh-autoenv ### Vim * [base16-vim](https://github.com/chriskempson/base16-vim): Base16 for Vim + * [codi.vim](https://github.com/metakirby5/codi.vim): :notebook_with_decorative_cover: The interactive scratchpad for hackers. * [comittia.vim](https://github.com/rhysd/committia.vim): A Vim plugin for more pleasant editing on commit messages * [completor.vim](https://github.com/maralla/completor.vim): Async completion framework made ease * [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): EditorConfig plugin for Vim diff --git a/editorconfig/.editorconfig b/editorconfig/.editorconfig index 9d08a1a8..f1a24789 100644 --- a/editorconfig/.editorconfig +++ b/editorconfig/.editorconfig @@ -7,3 +7,7 @@ indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +[Makefile] +indent_style = tab +indent_size = 8 diff --git a/vim/.vim/bundle/codi.vim b/vim/.vim/bundle/codi.vim new file mode 160000 index 00000000..e33ef0d6 --- /dev/null +++ b/vim/.vim/bundle/codi.vim @@ -0,0 +1 @@ +Subproject commit e33ef0d6a7e12358c1d53d6ed4e14e7ed66b53a1 diff --git a/vim/.vim/ftplugin/make.vim b/vim/.vim/ftplugin/make.vim new file mode 100644 index 00000000..b8e9abeb --- /dev/null +++ b/vim/.vim/ftplugin/make.vim @@ -0,0 +1,3 @@ +setlocal noexpandtab +setlocal shiftwidth=8 +setlocal softtabstop=0 diff --git a/x11/.xinitrc b/x11/.xinitrc index f3457e69..b454c0ab 100755 --- a/x11/.xinitrc +++ b/x11/.xinitrc @@ -1,8 +1,4 @@ #!/bin/zsh -# -# ~/.xinitrc -# -# Executed by startx (run your window manager from here) # Load all other xinitrc files if [ -d /etc/X11/xinit/xinitrc.d ]; then @@ -12,37 +8,53 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then unset f fi +# Load profile +source ~/.profile + # Start guest additions if available if command -v VBoxClient-all >/dev/null 2>&1; then VBoxClient-all fi -# Load profile -source ~/.profile - # Change mouse cursor from X11 X to normal one xsetroot -cursor_name left_ptr # Load custom keyboard mappings xmodmap ~/.xmodmap +# Set nice wallpaper +if command -v feh >/dev/null 2>&1; then + feh --bg-scale ~/.wallpaper +fi + +# Start autocutsel +if command -v autocutsel >/dev/null 2>&1; then + autocutsel -fork & + autocutsel -selection PRIMARY -fork & +fi + +# Start clipboard manager daemon +if [ -f ~/.config/dmenu/clipmenu/clipmenud ]; then + ~/.config/dmenu/clipmenu/clipmenud & +fi + # Start music manager daemon -mopidy & +if command -v mopidy >/dev/null 2>&1; then + mopidy & +fi # Start dropbox -dropbox start & - -# Set nice wallpaper -feh --bg-scale ~/.wallpaper +if command -v dropbox >/dev/null 2>&1; then + dropbox start & +fi -# Start clipboard manager daemon -~/.config/dmenu/clipmenu/clipmenud & +# Now, open terminal window +if command -v set >/dev/null 2>&1; then + st & +fi # Start key manager daemon sxhkd & -# Now, open terminal window -st & - # And finally, start our WM exec bspwm diff --git a/zsh/.zsh/bundle/codi.plugin.zsh b/zsh/.zsh/bundle/codi.plugin.zsh new file mode 100644 index 00000000..65f98580 --- /dev/null +++ b/zsh/.zsh/bundle/codi.plugin.zsh @@ -0,0 +1,13 @@ +# Codi +# Usage: codi [filetype] [filename] +codi() { + local syntax="${1:-python}" + shift + vim -c \ + "let g:startify_disable_at_vimenter = 1 |\ + set bt=nofile ls=0 noru nonu nornu |\ + hi ColorColumn ctermbg=NONE |\ + hi VertSplit ctermbg=NONE |\ + hi NonText ctermfg=0 |\ + Codi $syntax" "$@" +}