Browse Source

Update dotfiles

pull/4/head
Ein Verne 4 years ago
parent
commit
a2212c8b1a
  1. 3
      .gitmodules
  2. 1
      .vim/bundle/Vundle.vim
  3. 18
      .vim/startup/easymotion_vimrc
  4. 1
      .vim/startup/vundle_vimrc
  5. 1
      .vimrc
  6. 23
      clone-all-gitlab.py
  7. 5
      conf/zsh/alias.zsh
  8. 4
      conf/zsh/common.zsh
  9. 23
      wp-completion.bash

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule ".vim/bundle/Vundle.vim"]
path = .vim/bundle/Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git

1
.vim/bundle/Vundle.vim

@ -1 +0,0 @@
Subproject commit 9a38216a1c0c597f978d73547d37681fc689c90d

18
.vim/startup/easymotion_vimrc

@ -0,0 +1,18 @@
"Turn on case insensitive feature
let g:EasyMotion_smartcase = 1
"Use upper target labels and type as a lower case
let g:EasyMotion_use_upper = 1
" move to character
nmap f <Plug>(easymotion-s2)
xmap f <Plug>(easymotion-s2)
omap f <Plug>(easymotion-s2)
" move to word
nmap F <Plug>(easymotion-bd-w)
xmap F <Plug>(easymotion-bd-w)
omap F <Plug>(easymotion-bd-w)
" move to line
nmap gl <Plug>(easymotion-bd-jk)
xmap gl <Plug>(easymotion-bd-jk)
omap gl <Plug>(easymotion-bd-jk)

1
.vim/startup/vundle_vimrc

@ -22,6 +22,7 @@ endif
" If you need Vim help for vim-plug itself (e.g. :help plug-options), register " If you need Vim help for vim-plug itself (e.g. :help plug-options), register
" vim-plug as a plugin. " vim-plug as a plugin.
Plug 'junegunn/vim-plug' Plug 'junegunn/vim-plug'
Plug 'easymotion/vim-easymotion'
"Plug 'tpope/vim-fugitive' "Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat' Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'

1
.vimrc

@ -333,6 +333,7 @@ else
source $HOME/.vim/startup/vundle_vimrc source $HOME/.vim/startup/vundle_vimrc
source $HOME/.vim/startup/python_vimrc source $HOME/.vim/startup/python_vimrc
source $HOME/.vim/startup/map_vimrc source $HOME/.vim/startup/map_vimrc
source $HOME/.vim/startup/easymotion_vimrc
endif endif
" source $VIMRUNTIME/vimrc_example.vim " source $VIMRUNTIME/vimrc_example.vim

23
clone-all-gitlab.py

@ -0,0 +1,23 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# https://stackoverflow.com/a/57412415/1820217
# pip install python-gitlab
# python clone-all-gitlab.py GITLAB_HOST GROUP_ID PERSONAL_ACCESS_TOKEN
import os
import sys
import gitlab
import subprocess
glab = gitlab.Gitlab(f'https://{sys.argv[1]}', f'{sys.argv[3]}')
groups = glab.groups.list()
groupname = sys.argv[2]
for group in groups:
if group.name == groupname:
projects = group.projects.list(all=True)
for repo in projects:
command = f'git clone {repo.ssh_url_to_repo}'
process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
output, _ = process.communicate()
process.wait()

5
conf/zsh/alias.zsh

@ -11,3 +11,8 @@ alias ag="ag -i"
alias mkdir="mkdir -p" alias mkdir="mkdir -p"
alias e=$EDITOR alias e=$EDITOR
alias mci="mvn -e -U clean install"
# https://stackoverflow.com/a/15503178/1820217
alias gitlog="git ls-files -z | xargs -0n1 git blame -w --show-email | perl -n -e '/^.*?\((.*?)\s+[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n"

4
conf/zsh/common.zsh

@ -4,6 +4,8 @@ setopt histignorealldups sharehistory
# Keep history within the shell and save it to ~/.zsh_history: # Keep history within the shell and save it to ~/.zsh_history:
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=$HISTSIZE
HISTFILE=~/.zsh_history HISTFILE=~/.zsh_history
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.

23
wp-completion.bash

@ -0,0 +1,23 @@
# bash completion for the `wp` command
_wp_complete() {
local OLD_IFS="$IFS"
local cur=${COMP_WORDS[COMP_CWORD]}
IFS=$'\n'; # want to preserve spaces at the end
local opts="$(wp cli completions --line="$COMP_LINE" --point="$COMP_POINT")"
if [[ "$opts" =~ \<file\>\s* ]]
then
COMPREPLY=( $(compgen -f -- $cur) )
elif [[ $opts = "" ]]
then
COMPREPLY=( $(compgen -f -- $cur) )
else
COMPREPLY=( ${opts[*]} )
fi
IFS="$OLD_IFS"
return 0
}
complete -o nospace -F _wp_complete wp
Loading…
Cancel
Save