My linux setup including vim config (based on this) etc. Be sure to always be in home dir (cd ~) when installing!
Note: I'm using the WSL with Kali-Linux for this setup. Currently im using Ubuntu with Regolith-Linux and rarely KDE. And alot of vim and the command line. Absolutely worth learning!
Find detailed vim shortcut list here.
sudo apt-get install zsh git neovim g++ gcc gdb cgdb valgrind default-jdk tig
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
pip install thefuck
- download and install the ttf fonts from powerline manually on your Windows PC
- set terminal default settings to DejaVu Sans Mono for Powerline.ttf under Right Click on Terminal > Default values > Font
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
Now restart the zsh (the terminal) and go back to home directory (cd ~). Configure powerlevel10k as you want it (you can always reconfigure it anytime with p10k configure).
Note: apt-get package manager has to be replaced with yours (on mac e.g. with
brew install).
git clone https://github.com/larsaars/linux-setup.git
cd linux-setup
cp -R * ..
cp -R .[a-zA-Z0-9]* ..
cd ..
sudo cp mkcpp /usr/bin
sudo chmod +x /usr/bin/mkcpp
pip3 install pynvim --upgrade
:PlugInstall
:UpdateRemotePlugins
:Copilot setup
git config --global --replace-all credential.helper store
rm -rf LICENSE README.md executevim.cpp
- more beautiful look of shell
- more possibilites
- press
F2to toggle paste mode - git implementation
- use
F3forgit pull - use
F4forgit add -A && git commit -m "... - use
F5forgit push
- use
- press
F6to copy .clang-format to current directory, whenever saving the file it will be beautified - press
F7to compile and execute automatically (single files only)- currently supported: c, c++, java, python
- params can be entered
- choose between debugging with cgdb and valgrind or release mode
- press
F8to toggle style - press
F9or"to toggle tree- open folders with
enter - replace file in current window by clicking
enteron file - open multiple tabs with
tand switch between them withgtandgTor withalt-jandalt-k - with
vto open file in split window to left - switch between windows by pressing
ctrl+wand then use the standard movement keys to switch between windows (h,j,kandl)
- open folders with
- press
F10to:q! - press
jkat the same time in insert mode to exit it - press
öto jump to end of line, insert curly-braces and be in insert mode in the line- example:
int main(int argc), your cursor is atargc - exit insert mode and press
ö, you will get:int main(int argc) { // you are here }
- example:
- press
äto jump to end of line and insert a semicolon - press
üto delete two together belonging parenthesis, brackets or braces - press
+in visual or command mode to swap inline comment of line - press
-in command mode to actually enter a newline below staying in command mode - auto format on save
- auto indent and bracket replacement
- general styling
- error linting
- use
vip *.cfor example to open all files ending with '.c' in pwd
- enter
mkcpp nameto create in current directory a cpp file with belonging header and include this header in cpp file
- compile c++ code with
g++ -o0 -ggdb3 filename.cpp -o execname - start debugger with
cgdb filenameorgdb -tui filename- set a breakpoint at main:
break main - run with:
run param1 param2 ... paramN norsfor line to line stepping, then only press enter
- set a breakpoint at main:
valgrind (source of explanation)
To run Valgrind, pass the executable as an argument (along with any parameters to the program).
valgrind --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind-out.txt \
./executable exampleParam1
- basic linux commands
- how to navigate through linux terminal (and basic commands)
- vim shortcuts