Configuration files for my zsh (shell), GNU screen (terminal multiplexer) and Vim (text editor) environment on Linux/Windows, used from PuTTY (ssh client) on Windows.
I use the Solarized color scheme in Vim, PuTTY, Gnome terminal and for GNU dircolors.
In this file GitHub Flavored Markdown is used.
See more info about cloning on GitHub. See below Submodules section, too.
git clone https://github.com/aswna/Environment.git
git clone [email protected]:aswna/Environment.git
Create symbolic links in your home directory to the configuration files in this repository. Some examples:
.config/redshift.conf -> <repo dir>/.config/redshift.conf
.dircolors -> <repo dir>/dircolors-solarized/dircolors.256dark
etc -> <repo dir>/etc
.gitconfig -> <repo dir>/.gitconfig
.hgrc -> <repo dir>/.hgrc
.plan -> <repo dir>/.plan
.pystartup -> <repo dir>/.pystartup
.screenrc -> <repo dir>/.screenrc
.vim -> <repo dir>/.vim
.vimrc -> <repo dir>/.vimrc
.zsh -> <repo dir>/.zsh
.zshrc -> <repo dir>/.zshrc
Adding a new Git submodule is easy.
git submodule add <git repo> <directory to clone submodule into>
You can clone the repository in a way, which clones the submodules, too, with Git 1.6.5 and later.
git clone --recursive <git repo>
In an already existing (cloned) repository, you need to initialize the submodules first and -- usually -- switch to the main branch. The best I could find is the following:
git submodule update --init --recursive
git submodule foreach --recursive git checkout master
git submodule foreach --recursive git pull
- Delete the relevant line from the
.gitmodules
file. - Delete the relevant section from
.git/config
. - Run
git rm --cached <path_to_submodule>
(no trailing slash). - Delete the now untracked submodule directory.
- Commit the "superproject" (modified
.gitmodules
file and deleted submodule directory). - Remove the submodule cache from
.git/modules/
. Example:rm -rf .git/modules/.vim/bundle/vim-cccs
. Otherwise, it does not seem possible to add a different submodule with the same name, to the same place.
For more details see the Git submodule tutorial.
On Windows -- currently -- the only interesting thing here is the Vim configuration, settings.
Add Python directories to System Path: Computer -> Right-click -> Properties -> Advanced System settings -> Advanced (in System Properties) -> Environment variables -> System variables -> Path.
Path = ...;C:\Python27;C:\Python27\Scripts;C:\Python27\Lib\site-packages
Add some Unix-like utilities from Git install path:
Path = ...;C:\Program Files (x86)\Git\bin
I assume Python (2.7) is already installed. Download and execute distribute_setup.py, then install pip with the following command:
easy_install pip
After having pip, it is easy to install the Python syntax checkers. Namely
pip install -U flake8 frosted isort mccabe py3kwarn pycodestyle pydocstyle pyflakes pylama pylint
Note: flake8 installs pycodestyle, pyflakes and mccabe. Pylama is a wrapper around pycodestyle, pydocstyle, pyflakes, pylint, maccabe, and isort. Pylama seems to be a better alternative compared to flake8.
Make sure, you have the correct proxy settings in the shell, where the git commands are invoked. (There are no quotes around <your proxy:port>)
set http_proxy=<your proxy:port>
set https_proxy=<your proxy:port>
Check whether you are using Symantec Endpoint Protection. If so, the you may want to change Client Management settings: Current location to "Out of ... premises".
See step 6. in Deleting a submodule section above.
Error during the pull of YouCompleteMe:
Entering '.vim/bundle/YouCompleteMe/python/ycm/completers/python/jedi'
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/davidhalter/jedi.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
Stopping at 'python/ycm/completers/python/jedi'; script returned non-zero status.
Stopping at '.vim/bundle/YouCompleteMe'; script returned non-zero status.
Solution (workaround 1): Edit below files, to contain the git protocol and not https for Jedi.
.git/modules/.vim/bundle/YouCompleteMe/modules/python/ycm/completers/python/jedi/config
.vim/bundle/YouCompleteMe/.gitmodules
Solution (workaround 2):
env GIT_SSL_NO_VERIFY=true git submodule foreach --recursive git pull
Following troubles are obsolete, since my way of use has changed.
Use default PuTTY config options, except for Terminal -> Features -> Disable application cursor keys mode. Its default setting is off, and it must be turned on.
See above.
Sometimes git pull cannot succeed. Example:
Stopping at 'zsh'; script returned non-zero status.
> cd zsh
> git branch
* (no branch)
master
> git checkout master
See above "Cloning, updating a submodule".
Set the correct templates path explicitly.
git clone --template=/path/to/git-core/templates [email protected]:aswna/Environment.git