mirror of https://github.com/einverne/dotfiles.git
Ein Verne
4 years ago
9 changed files with 74 additions and 5 deletions
@ -1,3 +0,0 @@
|
||||
[submodule ".vim/bundle/Vundle.vim"] |
||||
path = .vim/bundle/Vundle.vim |
||||
url = https://github.com/VundleVim/Vundle.vim.git |
@ -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) |
@ -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() |
@ -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…
Reference in new issue