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
F2
to toggle paste mode - git implementation
- use
F3
forgit pull
- use
F4
forgit add -A && git commit -m "...
- use
F5
forgit push
- use
- press
F6
to copy .clang-format to current directory, whenever saving the file it will be beautified - press
F7
to 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
F8
to toggle style - press
F9
or"
to toggle tree- open folders with
enter
- replace file in current window by clicking
enter
on file - open multiple tabs with
t
and switch between them withgt
andgT
or withalt-j
andalt-k
- with
v
to open file in split window to left - switch between windows by pressing
ctrl+w
and then use the standard movement keys to switch between windows (h
,j
,k
andl
)
- open folders with
- press
F10
to:q!
- press
jk
at 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 *.c
for example to open all files ending with '.c' in pwd
- enter
mkcpp name
to 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 filename
orgdb -tui filename
- set a breakpoint at main:
break main
- run with:
run param1 param2 ... paramN
n
ors
for 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