Setup your programming Environment on a new machine¶
Setting up Terminal¶
- Setting up colorscheme: Dark theme are cosidered to cause less eye strain.
- Use dracula with iTERM on mac and Dracula colorscheme with GNOME Terminal on Linux.
- Go to Terminal -> Preferences -> Settings -> Keyboard -> Select use option as meta keys
- Go to Terminal -> Preferences -> Settings -> Keyboard -> Delete shortcuts having (Alt + left arrow) and (Alt + Right arrow)
- Install source code pro font on Ubuntu.
- Set the font in terminal profiles as well.
Setup zshrc¶
Most linux installations come with bash as the default shell. Many (including me), opine that
zshis better.Installation with sudo access
sudo apt install zshInstallation without sudo
sudo apt install zsh- Go to https://www.zsh.org/pub and download
wget https://www.zsh.org/pub/zsh-5.7.1.tar.xz tar -xzf zsh-5.7.1.tar.xz && rm zsh-5.7.1.tar.xz && cd zsh-5.7.1mkdir ~/local && ./configure --prefix=$HOME/local && make && make check && make installecho "export PATH=$HOME/local/bin:$PATH" >> ~/.bashrcecho "exec zsh" >> ~/.bashrc- Then restart the shell.
- Refer How to install zsh, oh-my-zsh without sudo
- Go to https://www.zsh.org/pub and download
For plugin management install oh-my-zsh
With sudo: .. code-block:: bash
sh -c “$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”`
Without sudo: * First switch to zsh .. code-block:: bash
curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sed -e ‘s/grep/zsh$/etc/shells/which zsh/g’ | zsh`
Most useful plugins are git, fasd, zsh-autosuggestions, zsh-syntax-highlighting, zsh-completions, z
Use spaceship theme
Download the
zshrc fileans place it in $HOME.
Setup Editor¶
- Nvim is available at https://github.com/neovim/neovim.git
- Installation:
- With sudo access:
sudo apt install neovim && sudo apt install python3-neovim(since ubuntu 18.04) - Without sudo: Download a pre-built image (currently, nvim-linux64.tar.gz)
- Make sure that the path to desired nvim exists is $PATH
- For Mac, brew install neovim also should work.
- With sudo access:
- Setup
- Install vim-plug plugin manager from https://github.com/junegunn/vim-plug
- Make sure that the following structure exists in your machine
$HOME/.config/nvim/init.vim - Download
Init Vim fileand place it in the above described path. pip install pynvim jedi
- Plugins
- All plugins can be installed by running
:PlugInstallin nvim - The Coc nvim plugin (available at https://github.com/neoclide/coc.nvim.git) requires more setup.
- Install nodejs on your machine by downloading the binary from https://nodejs.org/en/download/
- Install coc-python using
:CocInstall coc-python - Set the desired python interpreter using
:CocCommand python.setInterpreter. Do checkout other options by using:CocCommand
- All plugins can be installed by running
- Additionally install a terminal based editor micro
breq install micro- Download the required package from https://github.com/zyedidia/micro/releases
tar -xvf micro-1.2.1-60-linux64.tar.gz- Point the
$PATHvariable to includemicro-1.x.x/micro - Execute micro command from terminal in a normal fashion.
Setup TMUX¶
- Install tmux locally by cloning the repo https://github.com/tmux/tmux.git
cd <tmux_install_folder> && sh autogen.sh && ./configure && make- To install without sudo access, try
export DESTDIR=<local_dir_path> make install - Other alternative is given here https://www.gnu.org/prep/standards/html_node/DESTDIR.html
- Download
Tmux config fileand place it in$HOME. - Read the config file for explanations regarding multple options.
Setup OneDrive¶
- Use Microsoft OneDrive storage to sync all your files across different machines
- Installation
- In a local opt folder,
git clone https://github.com/abraunegg/onedrive.git make && export DESTDIR=$HOME/opt/onedrive/ make install- Make sure that
$PATHpoints to this folder - Try
onedrive -hfor exploring various options.
- In a local opt folder,