Browse Source

修改vim默认插件安装位置,加入卸载脚本

master
Alvis Zhao 6 years ago
parent
commit
f9f731d5f7
  1. 10
      Dockerfile
  2. 33
      README.md
  3. 7
      install.sh
  4. 8
      uninstall.sh
  5. 3
      vim/.gitignore
  6. 2
      vim/vimrcs/plugins_config.vim

10
Dockerfile

@ -1,14 +1,10 @@ @@ -1,14 +1,10 @@
FROM alvisisme/docker-ubuntu-1604-163
LABEL maintainer="Alvis Zhao <alvisisme@163.com>"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y vim zsh tmux
DEBIAN_FRONTEND=noninteractive apt-get install -y git vim zsh tmux
COPY zsh /root/.oh-my-terminal/zsh
COPY tmux /root/.oh-my-terminal/tmux
COPY vim /root/.oh-my-terminal/vim
COPY setup.sh /root/.oh-my-terminal/setup.sh
RUN sh /root/.oh-my-terminal/setup.sh
COPY ./ /root/.oh-my-terminal/
RUN sh /root/.oh-my-terminal/install.sh
ENTRYPOINT [ "/bin/zsh" ]

33
README.md

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
* tmux
* vim
## 安装说明
## 如何安装
1. 安装必要的软件
@ -18,11 +18,28 @@ @@ -18,11 +18,28 @@
1. 备份必要的配置文件
1. 安装使用
1. 安装本工程
```bash
git clone https://github.com/alvisisme/oh-my-terminal.git ~/.oh-my-terminal
sh ~/.oh-my-terminal/setup.sh
sh ~/.oh-my-terminal/install.sh
```
1. 切换默认shell
```bash
chsh -s $(which zsh)
```
1. 安装vim插件
进入vim,命令模式下执行`:PlugInstall`,自动联网下载插件,插件位于`~/.oh-my-terminal/vim/plugged`目录下
## 如何卸载
```bash
sh ~/.oh-my-terminal/uninstall.sh
rm -r ~/.oh-my-terminal/
```
## 效果预览
@ -146,14 +163,12 @@ docker run -it oh-my-terminal @@ -146,14 +163,12 @@ docker run -it oh-my-terminal
`PREFIX 空格键`
## 注意事项
vim插件默认安装在`~/.vim/plugged`目录下,离线安装时需要将本工程和已完成安装的`~/.vim/plugged`一起复制移动到新机器上。
## 参考引用
* [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
* [on-my-tmux](https://github.com/gpakosz/.tmux)
* [super-vimer](https://github.com/alvisisme/super-vimer)
* [amix vimrc](https://github.com/amix/vimrc)
* [use vim as ide](https://github.com/yangyangwithgnu/use_vim_as_ide)
* [VIM Awesome](https://vimawesome.com/)
* [如何在 Linux 下利用 Vim 搭建 C/C++ 开发环境? - 韦易笑的回答 - 知乎](https://www.zhihu.com/question/47691414/answer/373700711)
* [Linux SSH终端terminal配色更改为256色](https://www.haiyun.me/archives/linux-terminal-xterm-256color.html)

7
setup.sh → install.sh

@ -9,9 +9,6 @@ ln -s -f ~/.oh-my-terminal/tmux/.tmux.conf ~/.tmux.conf @@ -9,9 +9,6 @@ ln -s -f ~/.oh-my-terminal/tmux/.tmux.conf ~/.tmux.conf
ln -s -f ~/.oh-my-terminal/tmux/.tmux.conf.local ~/.tmux.conf.local
# vim
mkdir -p ~/.vim/plugged
mkdir -p ~/.oh-my-terminal/vim/plugged
ln -s -f ~/.oh-my-terminal/vim ~/.vim_runtime
sh ~/.vim_runtime/install_basic_vimrc.sh
# 切换当前用户默认shell,重新进入终端后生效
chsh -s $(which zsh)
sh ~/.vim_runtime/install_super_vimrc.sh

8
uninstall.sh

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
#!/bin/bash
rm -f ~/.tmux.conf
rm -f ~/.tmux.conf.local
rm -f ~/.oh-my-zsh
rm -f ~/.vim_runtime
rm -f ~/.vimrc
rm -f ~/.zshrc

3
vim/.gitignore vendored

@ -1 +1,2 @@ @@ -1 +1,2 @@
.vscode/
.vscode/
plugged

2
vim/vimrcs/plugins_config.vim

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
call plug#begin('~/.oh-my-terminal/vim/plugged')
" Make sure you use single quotes
Plug 'https://github.com/scrooloose/nerdtree.git'

Loading…
Cancel
Save