I have recently started using Vim after using Emacs for a while. I have Linux machine and a mac laptop at home and a Windows machine at work. I code mostly in Python and C++ and I got frustrated when every time when I switch my machine I have to work in totally different environment. I use CMake to produce Microsoft Visual Studio project files, so I don’t have to use Microsoft Visual Studio itself. Hence, I’ve started using MSYS2.
In msys2 you can install tmux using:
pacman -S tmux
python install.py --all
remember I had GoLang and NodeJS (
choco install golang and
choco install nodejs) and Visual Studio already installed. Then, I copied this folder to my
~/.vim in msys2. Under
C:\msys64\home\username\.vim\bundle\YouCompleteMe\third_party\ycmd there is a file named:
In this file it refers to the python that is used for compilation. You should chang it to msys compatible path similar to:
Some useless notes!
Comparing two files:
If you already have two panes open, you can
on each of them and then use:
]cGo to next block of diff
dpPush this version of the current block into the other pane
doUse the block from the other pane in this pane
You can then turn off diff mode in each pane with the vim command
Do you really need Caps key?!
- I use SharpKeys to change my
Ctrlkey, because I barely use caps.
- For mac you can do this using
System Preferences>>Keyboard>>Modifier Keys
- In Gnome you can do this using
Keyboard>>Layouts>>Options>>Ctrl position>>Caps Lockas
Now that you have mapped
Ctrlto an easier location you can use
Anaconda in MSYS2
In case you are interested your Anaconda Python Environments in msys2 add the following to your
~/.bash_profile (change username and anaconda path to yours)
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! eval "$('/c/Users/USER-NAME/anaconda3/Scripts/conda.exe' 'shell.bash' 'hook')" # <<< conda initialize <<<
Starting tmux by default
add the following to
~/.bashrc to start terminal or msys2 with tmux by default:
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach -t default || tmux new -s defaultfi
Looking for Fonts?
Here you can find some good fonts:
Here is my
Here is my