Skip to content

Commit ac78d8e

Browse files
author
Steve Jeong
committed
target: vi/configs: Change method.. input text to wget download.
Signed-off-by: Steve Jeong <[email protected]>
1 parent a868604 commit ac78d8e

File tree

6 files changed

+13
-206
lines changed

6 files changed

+13
-206
lines changed

distro/bionic/gnome-desktop/packages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ git
33
tig
44
tmux
55
vim-gtk3
6+
wget

distro/bionic/server/packages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ git
33
tig
44
tmux
55
vim
6+
wget

target/ros2/fixups/S21-ros2-config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
# The repo cannot be saved separately because it is added from the existing bashrc. This is because the contents of the existing bashrc are different depending on the Linux distribution version.
4+
35
ros2_config() {
46
sudo cat <<__EOF >> __HOME__/.bashrc
57
# ROS setting

target/vi/fixups/S21-git-config

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
11
#!/bin/bash
22

3-
# wget https://raw.githubusercontent.com/how2flow/config/ubuntu/.gitconfig
4-
git_config() {
5-
# user
6-
git config __GIT_OPTIONS__ user.name ""
7-
git config __GIT_OPTIONS__ user.email ""
8-
# color
9-
git config __GIT_OPTIONS__ color.ui "auto"
10-
# alias
11-
git config __GIT_OPTIONS__ alias.co "checkout"
12-
git config __GIT_OPTIONS__ alias.cy "cherry-pick"
13-
git config __GIT_OPTIONS__ alias.br "branch"
14-
git config __GIT_OPTIONS__ alias.ci "commit"
15-
git config __GIT_OPTIONS__ alias.st "status"
16-
git config __GIT_OPTIONS__ alias.logs "log --oneline --branches --graph"
17-
# core
18-
git config __GIT_OPTIONS__ core.editor "vim"
19-
# diff
20-
git config __GIT_OPTIONS__ diff.submodule "log"
21-
# http
22-
git config __GIT_OPTIONS__ http.sslVerify "false"
23-
}
3+
GITCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/gitconfig"
244

25-
if [ -n "$(command -v git)" ]; then
26-
[ -e __HOME__/.gitconfig ] && \
27-
sudo rm -rf __HOME__/.gitconfig
28-
git_config
29-
fi
30-
31-
sudo sed -i 's/\t/ /g' __HOME__/.gitconfig
5+
[ -e __HOME__/.gitconfig ] && sudo rm -rf __HOME__/.gitconfig
6+
wget -O __HOME__/.gitconfig ${GITCONFIG}

target/vi/fixups/S21-tmux-config

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,6 @@
11
#!/bin/bash
22

3-
# wget https://raw.githubusercontent.com/how2flow/config/ubuntu/.tmux.conf
4-
tmux_config() {
5-
sudo cat <<__EOF > __HOME__/.tmux.conf
6-
# prefix: 'C-b' -> 'C-a'
7-
unbind C-b
8-
set -g prefix C-a # Ctrl-a activate
9-
bind-key C-a send-prefix
3+
TMUX_CONF="https://raw.githubusercontent.com/how2flow/config/ubuntu/tmux.conf"
104

11-
# use vi keys in tmux
12-
set-window-option -g mode-keys vi # use vi keys in tmux
13-
14-
# select-window
15-
bind-key space next-window
16-
bind-key bspace previous-window
17-
18-
# split-windows prefix + u / n
19-
unbind '"'
20-
unbind %
21-
bind-key u split-window -h
22-
bind-key n split-window -v
23-
24-
# select-pane
25-
unbind o
26-
bind-key h select-pane -L
27-
bind-key l select-pane -R
28-
bind-key k select-pane -U
29-
bind-key j select-pane -D
30-
31-
# kill tmux windows
32-
unbind &
33-
bind-key R kill-window
34-
35-
# apply vi color scheme
36-
set -g default-terminal "xterm"
37-
set -g default-terminal "xterm-256color"
38-
__EOF
39-
}
40-
41-
if [ -n "$(command -v tmux)" ]; then
42-
[ -e __HOME__/.tmux.conf ] && \
43-
sudo rm -rf __HOME__/.tmux.conf
44-
tmux_config
45-
fi
5+
[ -e __HOME__/.tmux.conf ] && sudo rm -rf __HOME__/.tmux.conf
6+
wget -O __HOME__/.tmux.conf ${TMUX_CONF}

target/vi/fixups/S21-vi-config

Lines changed: 3 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,6 @@
11
#!/bin/bash
22

3-
# wget https://raw.githubusercontent.com/how2flow/config/ubuntu/.vimrc
4-
vi_config() {
5-
sudo cat <<__EOF >> __HOME__/.vimrc
6-
set shell=/bin/bash
7-
filetype off
8-
" vim plugin install check: vimawesome.com
9-
" vim vundle install : git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
10-
" :PluginInstall plugin install in .vimrc
11-
" :PluginList check plugin list in .vimrc
12-
" :PluginClean
13-
set rtp+=~/.vim/bundle/Vundle.vim
14-
call vundle#begin()
15-
Plugin 'VundleVim/Vundle.vim' " vim plugin management
16-
Plugin 'morhetz/gruvbox' " curl -O https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim
17-
" check install vim color scheme
18-
Plugin 'majutsushi/tagbar'
19-
Plugin 'scrooloose/nerdtree'
20-
Plugin 'nathanaelkane/vim-indent-guides'
21-
" git
22-
Plugin 'airblade/vim-gitgutter' " vim with git status(added, modified, and removed lines)
23-
Plugin 'tpope/vim-fugitive' " vim with git command(e.g., Gdiff)
24-
" airline
25-
Plugin 'vim-airline/vim-airline' " vim status bar
26-
Plugin 'vim-airline/vim-airline-themes'
27-
" auto
28-
Plugin 'AutoComplPop' " auto compl
29-
Plugin 'taglist-plus'
30-
call vundle#end() "$ vim +PluginInstall +qall
31-
filetype plugin indent on
3+
VIMRC="https://raw.githubusercontent.com/how2flow/config/ubuntu/vimrc"
324

33-
set t_Co=256
34-
set background=dark
35-
colorscheme gruvbox
36-
37-
syntax on " syntax hilight
38-
set hlsearch " search hilight
39-
set nu " print lines
40-
set autoindent
41-
set nocompatible
42-
set modeline
43-
set title
44-
set ts=4
45-
set sts=4
46-
set cindent
47-
" set mouse=a
48-
set laststatus=2
49-
set shiftwidth=4
50-
set showmatch
51-
set smarttab
52-
set smartindent
53-
set ruler
54-
set fileencodings=tuf8,euc-kr
55-
set clipboard=unnamedplus
56-
57-
"
58-
" About ctags & cscope
59-
"
60-
61-
" set tags
62-
set tags=./tags
63-
64-
" set cscope
65-
set csprg=/usr/bin/cscope
66-
set csto=0
67-
set cst
68-
set nocsverb
69-
70-
if has("cscope")
71-
if filereadable("./cscope.out")
72-
cs add cscope.out " $ mkcscope.sh
73-
endif
74-
set csto=0
75-
set cst
76-
endif
77-
78-
set csverb
79-
80-
" cscope Hot keys
81-
" https://cdang.tistory.com/80
82-
"
83-
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
84-
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
85-
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
86-
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
87-
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
88-
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
89-
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
90-
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
91-
nmap <C-\>a :cs find a <C-R>=expand("<cword>")<CR><CR>
92-
93-
"
94-
" ctrlp.vim setting
95-
"
96-
let g:ctrlp_custom_ignore = {
97-
\ 'dir': '\.git$\|public$\|log$\|tmp$\|vendor$',
98-
\ 'file': '\v\.(exe|so|dll)$'
99-
\ }
100-
101-
"
102-
" Tag list setting
103-
"
104-
let Tlist_Use_Right_Window = 1
105-
let Tlist_Auto_Open = 0
106-
let Tlist_Exit_OnlyWindow = 0
107-
let Tlist_Inc_Winwidth = 0
108-
let Tlist_Ctags_Cmd = "/usr/bin/ctags"
109-
110-
"
111-
" vim-airline setting
112-
"
113-
let g:airline#extensions#tabline#enabled = 1 " turn on buffer list
114-
let g:airline_theme='hybrid'
115-
set laststatus=2 " turn on bottom bar
116-
let mapleader = ","
117-
118-
"
119-
" hot key
120-
"
121-
map <F10> <C-w><C-v>
122-
map <tab> <C-w><C-w>
123-
124-
nmap <F5> :NERDTreeToggle<cr>
125-
nmap <F6> :TagbarToggle<cr>
126-
127-
nmap <F2> :bprevious<CR>
128-
nmap <F3> :bnext<CR>
129-
nmap <F4> :enew<cr>
130-
nmap <leader>bq :bp <BAR> bd #<CR>
131-
nmap <leader>bl :ls<CR>
132-
__EOF
133-
}
134-
135-
if [ -n "$(command -v vim)" ]; then
136-
[ -e __HOME__/.vimrc ] && \
137-
sudo rm -rf __HOME__/.vimrc
138-
vi_config
139-
fi
5+
[ -e __HOME__/.vimrc ] && sudo rm -rf __HOME__/.vimrc
6+
wget -O __HOME__/.vimrc ${VIMRC}

0 commit comments

Comments
 (0)