Custom vim configuration, highly inspired from VIM and Python – A Match Made in Heaven
Before running setupVim.sh
make sure your system meets all the requirements below :
You can install them with
sudo apt-get update
sudo apt-get install -y vim git build-essential cmake python python-pip
or for CentOS/Fedora/RedHAt
sudo dnf udpate
sudo dnf install -y vim git cmake gcc-c++ make python3-devel
sudo dnf groupinstall 'Development Tools'
end run bash setupVim.sh
This script was tested on Ubuntu > 16.04 & Fedora > 30
Controls | Mode | Description |
---|---|---|
Ctrl + hjkl
|
Normal |
Switch panes |
Ctrl + hjkl
|
Insert |
Move |
Ctrl + Space
|
Normal |
Toggle NERDTree |
F2 |
- | Paste toggle |
F3 |
- | Display number line toggle |
F4 |
- | Ask password for save as root |
My Tmux configuration
Copy file .tmux.conf
to ~/.tmux.conf
Controls | Description |
---|---|
Ctrl + q
|
Enter Tmux |
- |
Split a window horizontally |
+ |
Split a window vertically |
Ctrl + arrow |
Switch betewen panes |
Shift + arrow |
Key to move between windows |
e |
Edit and source the .tmux.conf file |
R |
Source the .tmux.conf file |
start new:
tmux
start new with session name:
tmux new -s myname
attach:
tmux a # (or at, or attach)
attach to named:
tmux a -t myname
list sessions:
tmux ls
kill session:
tmux kill-session -t myname
Kill all the tmux sessions:
tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill
In tmux, hit the prefix ctrl+b
(my modified prefix is ctrl+a) and then:
to see all the shortcuts keys in tmux simply use the bind-key ?
in my case that would be CTRL-B ?
:new<CR> new session
s list sessions
$ name session
c create window
w list windows
n next window
p previous window
f find window
, name window
& kill window
+ vertical split
- horizontal split
o swap panes
q show pane numbers
x kill pane
⍽ space - toggle between layouts
<prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane)
<prefix> { (Move the current pane left)
<prefix> } (Move the current pane right)
<prefix> z toggle pane zoom
I find a little script to save/restore tmux session. source here
Put script in : sudo vim /usr/local/bin/tmux-session
, add sudo chmod +x /usr/local/bin/tmux-session
.
Call it like so manually or periodically from cron (because you might forget):
tmux-session save
It will write to ~/.tmux-session
. Restore them after reboot like so:
tmux-session restore
My custom ZSH
~/.zshrc
by my .zshrc
mv ~/.zshrc .zshrc."$(date +%F)"
cp .zshrc ~/.zshrc
Oh My Zsh is an open source, community-driven framework for managing your Zsh configuration.
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
https://github.com/athityakumar/colorls#installation
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/tautomer/update-ohmyzsh-custom-plugins.git $ZSH_CUSTOM/plugins/update-custom-plugins
In my .zshrc, I use this plugins
Windows Terminal is a multi-tabbed command-line front-end that Microsoft has developed for Windows 10.It can run any command-line app, including all Windows terminal emulators, in a separate tab. It is preconfigured to run Command Prompt, PowerShell, WSL, SSH, and Azure Cloud Shell Connector.
I love Anonymous Pro Font. Download
For others fonts check here : https://www.nerdfonts.com/
In Windows Terminal, Open settings (Ctrl+,) and paste my settings.json.
Keybinding | Description |
---|---|
Ctrl+Shift+f | Open Search Box |
Ctrl+Shift+P | Open Command Palette (Default) |
Alt+Shift+d | Auto Split Pane in duplicate mode |
Alt+Shift+- | Horizontal Split Pane in duplicate mode |
Alt+Shift+plus | Vertical Split Pane in duplicate mode |
Alt+Shift+numpad_minux | Horizontal Split Pane in duplicate mode |
Alt+Shift+numpad_plus | Vertical Split Pane in duplicate mode |
// selections are automatically copied to your clipboard.
"copyOnSelect": true,
// formatted data is also copied to your clipboard
"copyFormatting": false,