commit 248c191f9ac32f7948aecc849c24dc2c88ef2439 Author: Sebastian Lenzlinger <74497638+sebaschi@users.noreply.github.com> Date: Wed Apr 19 11:38:24 2023 +0200 Commit after delete on local machine/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e53a9f3 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Some Notes +## Use SSH to clone repo +git clone git@github.com:sebaschi/dotfiles.git ~/.dotfiles +## Symlink files to correct locations +ln -s ~/.dotfiles/git/gitconfig ~/.gitconfig +ln -s ~/.dotfiles/vim/vimrc ~/.vimrc +ln -s ~/.dotfiles/bash/bashrc ~/.bashrc diff --git a/bash/.bash_history b/bash/.bash_history new file mode 100644 index 0000000..65c62d9 --- /dev/null +++ b/bash/.bash_history @@ -0,0 +1,1000 @@ +ls +cd socket_demo/ +ls +cd tcp +ls +less echo- +less echo-server.c +inetsexc +inetsec +ls +cd exercises/ +ls +evince ias-fs23-ex1.pdf +su seb +nvim .bashrc +unil +ls +ll +la +ll -A +cd +ls -A +ll +ll -aA +less .wget-hsts +less .ubuntu22.04.draft.txt +nvim .bashrc +make L1 +nvim Makefile +make L1 +evince os-exercise-1.pdf +ls +nvim T1.c +rm T1.o +gcc T1.c -o T1.o +./T1.o +nvim T1.c +cd tes +cd test +ls +nvim T1.c +cd .. +nvim T1.c +T2.sh +nvim T2.sh +ls +nvim T2.c +rm T1.o +ls +make clean +ls +cd +ls +ls -a +ls -al +ls +cd .config +ls +cd bash +ls -a +cd +ls -a +ls -la | grep .bashrc +cd .bashrc +ls -a +nvim .bashrc +echo .bashrc | greap alias +echo .bashrc | grep alias +cat .bashrc | grep alias +cthoc +thoc +cd ... +nvim .vimrc +rm /home/slnopriv/.local/state/nvim/swap//%home%slnopriv%.vimrc.swp +nvim .vimrc +nvim .vimrc +nvim -r .vimrc +unil +ls +cd inetsec23/ +ls +cd ex1/ +ls +nvim chat-client.c +man 2 poll +man 2 listen +man 7 socket +man 2 socket +man 2 select +man stdin +man 2 select +man 2 FD_SET +man 7 select +man 3 select +man 1 select +man 2 select +man poll +man fileno +man fread +man read +man 2 read +man 2 stdio +man stdio +man select +man 2 poll +man 2 pollfd +man 2 poll +man inet_top +man inet_ntop +unil +cd ex +ls +cd inetsec23/ +cd ex1/ +ls +touch chatter.py +ls +nvim chatter.py +python3 chatter.py 8080 +nvim chatter.py +nvim .vimrc +unil +cd inetsec23/ex1/ +ls +python3 chatter.py 8080 +unil +cd inetsec23/ex1/ +ls +cd +ls +touch chtgpt +nvim chtgpt +./ +python chtgpt +touch chatgpt2 +nvim chatgpt2 +python chatgpt2 8080 +python chatgpt2 8081 +python chatgpt2 0.0.0.0 9080 +unil +ls +cd inetsec23/ +l +ls +cd socket_demo/ +ls +cd tcp/ +ls +nvim echo-client.c +python chtgpt 127.0.0.1 1234 +which python3 +unil +cd inetsec23/ex1/ +ls +nvim chat-client.c +gcc -o chcl chat-client.c +./chcl +gcc -o chcl chat-client.c +./chcl +./chcl 8080 +gcc -o chcl chat-client.c +./chcl 8080 +gcc -o chcl chat-client.c +./chcl 8080 +gdp ./chcl 8080 +gcc -o chcl chat-client.c +./chcl 8080 +unil +cd inetsec23/ex1/ +ls +nvim chat-client.c +unil +cd inetsec23/ex1/ +ls +man INADDR_ANY +man inet +ma inet_ntoa +man inet_ntoa +ls +./chcl 127.0.0.1 8080 +ls +git init +git remote add origin git@github.com:sebaschi/unibasfs23.git +git branch -M main +git push -u origin main +git remote add origin git@github.com:sebaschi/unibasfs23.git +git branch -M main +git push -u origin main +git pull +git pull origin main +git add -A +git commit -m "Initial commit w/ pids and inetsec folder" +git push +git push --set-upstream origin main +git pull +ls +cd inetsec23/ +ls +mkdir ex1 +man mv +ls +cd socket_demo/ +ls +cd tcp +ls +mv chat-client.c ../../ex1 +cd ../../ex1 +ls +gcc -o chch chat-client.c +nvim chat-client.c +gcc -o chat chat-client.c +nvim chat-client.c +ls +inetsec +cd exercises/ +ls +eviunce ias-fs23-ex1.pdf +evince ias-fs23-ex1.pdf +inetsec +ls +cd lecture/ +ls +cd dl/displaylink-rpm/ +ls +su seb +ls +ll +ll -a +ll +rm chtgpt +tm chatgpt2 +rm chatgpt2 +ls +ll +unil +git add -a +git add -A +git commit -m "Backup" +git pull +unil +git add -A +ls +mv ~/chatgpt3.py ./inetsec/chatty.py +chatgpt3 +./chatgpt3 +mv ~/chatgpt3 ./inetsec/chatty.py +man mv +mv -t ~/chatgpt3 ./inetsec/chatty.py +man mv +mv -T ~/chatgpt3 ./inetsec/chatty.py +ls +mv -T ~/chatgpt3 ./inetsec23/chatty.py +cd inetsec23/ +cd ex1/ +ks +ls +cd . +cd .. +ls +mv chatty.py ex1 +cd ex1/ +ls +man 7 socket +man ntohs +man pthread +man pthread_create +man strncpy +man socket +man getsockname + man accept +man getpeername + man accept +man getpeeraddr +man getpeername +man strncpy +man recv +man ssize_t +man scanf +man INDADDR_ANY +man socket +man inet +man read +man 7 read +man 2 read +man poll +man 2 select +man send +man atoi +man RECEIVER_IP +man read +man 2 read +man 2 read +nvim .vimrc +unil +cd inetsec23/ex1/ +ls +python chatty.py +unil +cd inetsec23/ex1/ +python chatty.py 127.0.0.1 10000 +'' +unil +cd inetsec23/ +ls +cd socket_demo/ +ls +cd udp/ +ls +cat receiver.c +unil +cd inetsec23/ex1/ +gcc -o test chatter.c +ls +gcc -o test chat-client.c +gcc -o test chat-client.c -c +ls +./test +chmod +0700 test +;s +ls +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +gcc -o test chat-client.c +./test +git add -A +git pull +git commit -m "Finally finnished ex 1" +ls +gcc -o ex1chat chat-client.c +git add -S +git add -A +git commit -m "Changed name of object file" +./test +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +gcc -o ex1chat chat-client.c +./ex1chat +git add -A +git commit -m"No more random chars in buffers printed to screen and added pthread error handling.\n" +git add -A +git commit -m "Rename file" +ls +man mv +unil +ls +cd inetsec23/ +ls +cd ex1/ +ls +touch udpserver.c +nvim chatty.py +touch udpserver.py +nvim udpserver.py +ls +cdpex +ls +cd exercise4 +ls +jupter-lab 04-exercise-pids2023.ipynb +jupyter-lab 04-exercise-pids2023.ipynb +man select +python3 +unil +cd inetsec23/ +cd ex1/ +ls +cd . +cd .. +ls +cd socket_demo/ +ls +cd udp/ +ls +cat receiver.c +cat sender.c +ls +unil +ls +cd inetsec23/ +ls +cd ex1/ +ls +mv chat-client.c tcpchat.c +man listen(1) +man listen +unil +cd inetsec23/ex1/ +ls +touch udpclient.py +nvim udpclient.py +cpex +cdpex +ls +git merge] +git pull +git add _A +git add -A +git commit -m "Try to fix ex 4" +ls +git pull +ls +cd exercise4 +ls +jupyter-lab 04-exercise-pids2023.ipynb +uni23 +cd t +ls +cd todo +ls +evince ias-fs23-ex1.pdf +man putc +unil +cd inetsec23/ex1/ +ls +./ test 127.0.0.1 8080 +./test 127.0.0.1 8080 +./ex1chat 127.0.0.1 8080 +./test 127.0.0.1 8080 +./ex1chat 127.0.0.1 8080 +glib ./ex1chat +./ex1chat 127.0.0.1 8080 +unil +cd inetsec23/ex1/ +ls +./test 127.0.0.1 8080 +man read +man 2 read +which anyconnect +find / anyconnect +find /home/slnopriv anyconnect +find /home/slnopriv anyconnect* +find /home/slnopriv vpn +nmli device +nmcli device +nmcli con reload wlp44s0 +sudo seb +su seb +man 5 NetworkManagerf.conf +man 5 NetworkManager.conf +nvim resolv.conf +which resolve.conf +cd /etc/ +ls +cd authselect/ +ls +cat authselect.conf +cat nsswitch.conf +finman find +man find +find / resolv.conf +find / resolv.conf | grep wifi +unil/os +unil +cd os +ls +less T1.c +gcc -o t1 T1.c +./t1 +git pull +git status +git push +git status +git add -A +git commit -m "Fixes" +git push +git status +git branch +less T1.c +nvim T1.c +clear +sh T2.sh /etc/temp/ test.txt +sh T2.sh temp/ test.txt +ls +rmdir test +ls +clear +ls +ll +rm t1 +ls +ll +ll temp +rm temp +rmdir temp +rm -r temp +ls +rm test.txt +ls +clear +ll +nvim T1.c +clear +ll +sh T2.sh /etc/temp/ test.txt +sh T2.sh temp/ test.txt +ll +clear +less T2.sh +less T2.c +ll +clear +ll +gcc -o t2 T2.c +rm t2 +ll +clear +ll +gcc -o T2.o T2.c +./T2.c /etc/temp/ test.txt +./T2.c temp/ test.txt +./T2.o temp/ test.txt +rm test.txt +rmdir temp +cd temp +ls +rm remp +em temp +rm temp +ls +cd .. +rmdir temp +ls +ll +clear +ls +./T2.o /etc/temp/ test.txt +./T2.o temp/ test.txt +ls +clear +less Makefile +clear +ll +ls +clear +ls +make L1 +ls +./t3_case1.o +clear +ls +make L2 +ls +./t3_case2.o +clear +ls +make L3 +ls +./t3_case3.o +uni23 +ls +cd +ls +unil +ls +cd .. +ls +cd .. +ls +mv os-exercise-1/ ./UniBas/FS23/os +ls +unil +ls +cd os +ls +evince os-exercise-1.pdf +ls +evince os-exercise-1.pdf +uni32 +uni23 +ls +cd todo/ +ls +cd .config +ls +ls | grep dropbox +cd autostart/ +ls +rm dropbox.desktop +ls +cd /etc/xdg/ +ls +cd autostart +ls +rm kaspersky-kesl.desktop +sudo seb +su seb +uname -r +grubby --default-kernel +su seb +uname -r +lsblk +lscpu +hwinfo +powerprofilesctl list +uname -r +fwupdmgr get-devices +inxi +echo $XDG_SESSION_TYPE +su seb +uname -r +ls /boot +su seb +os +ls +cd lectures/ +ls +evince 03-OS-FS23-a.Processes-65.pdf +unil +ls +mkdir paradigmen +ls +git pull +git add _A +git add -A +git commit -m "New Directory for Praradigmen und Konzepte von Programmiersprachen" +git push +cd +su seb +unil +cdos +cd os +cd os-exercise-2/ +gcc -o ex1 T1.c +man wait +man 2 wait +unil +cd +ls +unil +cd pids +ls +cd pids23 +ls +cd ex +cd exercises/ +ls +ed pids_2023/ +syncbooks +gnome +gnome-shell +logout +pkvps +cd lectures/ +ls +evince 04-c++-zeiger.pdf +unil +cd paradigmen/ +ls +cd ex1/ +git pull +ls +touch functionpointers.cpp +nvim functionpointers.cpp +cd .. +ls +git add -A +git commit -m "Create and add PKVPS Ex 1" +git push +git pull +cd .. +ls +cd os +ls +cd os-exercise-2/ +ls +evince os-exercise-2.pdf & +thoc +cd lectures/ +ls +evince theory-b10-handout4.pdf && evince theory-b11-handout4.pdf && evince theory-b12-handout4.pdf +evince theory-b10-handout4.pdf; evince theory-b11-handout4.pdf ; evince theory-b12-handout4.pdf & +evince theory-b10-handout4.pdf &; evince theory-b11-handout4.pdf &; evince theory-b12-handout4.pdf & +evince theory-b10-handout4.pdf & evince theory-b11-handout4.pdf & evince theory-b12-handout4.pdf & +uname -r +rg foo -A 5 +rg ioctl +fuser /dev/input/event1 +fuser -v /dev/input/event1 +fuser -v /dev/input/event* +lsof /dev/input/event* +pd +top +top -f +top -r +pstree +ps -ef --forest +lsof +D /dev/input/ +lsof /dev/input/event4 +ps --tree +pstree +uni23 +cd inetsec/ +ls +cd exercises/ +ls +unil +git add _A +git add -A +git commit -m "Add Inetsec ex 2 pdf." +pit push +git push +nslookp unibas.ch +nslookup unibas.ch +unil +cd os/ +ls +cd .. +cd inetsec23/ +ll +unzip chat.zip +ll +cd tcp +ll +cat README +ll +cat runchats.sh +less runchats.sh +cd .. +ll +cd udp +ll +cat README +which wireshark +su seb +man shm_open +man mmap +man 7 mmap +man mmap2 +man 2 mmap +man mumap +man 2 mmap +thoc +cd lectures/ +ls +man shm_open +cd .. +ls +unil +ls +cd inetsec23/ +ls +cd ex1/ +l +ls +gedit tcpchat.c +nvim tcpchat.c +unil +git pull +ls +cd pids23 +ls +cd exercises/ +ls +cd pids_2023/ +ls +cd exercises/ +ls +git pull +ls +cd exercise +cd exercise6 +ls +jupyter-lab 06-exercise-pids2023.ipynb +unil +ls +cd p +cd paradigmen +ls +cd ex1/ +ls +pids +l +cd l +cd lectures/ +ls +uni +ppkvps +pkvps +ls +cd exercises/ +ls +evince cs109-e1.pdf +uni23 +inetsec +cd exercises/ +ll +evince ias-fs23-ex2.pdf & +unil +cd os/ +ls +cd os-exercise-2/ +ls +nvim T1.c +nvim T2.c +pkvps +cd lectures/ +ls +evince 03-c++-einfuehrung.pdf +thoc +cd exercises/ +ls +evince sheet06.pdf & +cd /dev/input/ +ll +cat event4 +su seb +gnome-shell +gnome-shell-sessino +login +login -h +login --help +login -H slopriv +login -h fedora +journalctl -f +journalctl -fas +man jounrn +journalctl -h +journalctl --user +journalctl --user -r +sudo journalctl +su seb +cd /etc/yum.repos.d +ll +rm dropbox.repo +aptititude why +aptitude hy +aptitude why +dnf why dleyna +dnf --help why +dnf --help +aptitude why dleyna-renderer +dnf search aptitude +su seb +unil +ll +git status +gitt add -A +git add -A +git commit -m "Add tcp/udp/multicast programms to use with Wireshark." +git push +unil +cd os/ +ll +cd os-exercise-2/ +ll +evince os-exercise-2.pdf & +nvim T1.c +man mmap +man pthread_createman pthread_create +unil +ll +git pull +cd os/os-exercise-2/ +ll +rm a.out +gcc T3.c +./a.out +gcc T3.c +./a.out +gcc T3.c +./a.out +gcc T3.c +./a.out +git add -A +git commit -m"T3.c functional and correct result." +git pull +git push +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +git add -A +git commit -m "Implement fcfs and displau avrg wait" +git pull +git push +git diff main origin +git diff -h +git config pull.rebase false +git pull +git push +gcc T4.c +./a.out +gcc T4.c +./a.out +gcc T4.c +./a.out +git add -A +git commit -m "Implement SJF and LJF policy." +git pull +git push +cat T2.c +gcc T2.c +git pull +git add -A +ls +rm a.out +git add -A +git commit -m "Add comments to T4.c" +git pull +git push +unil +cd os/os-exercise-2/ +ll +evince os-exercise-2.pdf & +nvim T3.c +nvim T4.c +rm /home/slnopriv/.local/state/nvim/swap//%home%slnopriv%Documents%Education%U +niBas%FS23%os%os-exercise-2%T1.c.swp +rm ~/.local/state/nvim/swap//%home%slnopriv%Documents%Education%U +rm -rf ~/.local/state/nvim/swap//%home%slnopriv%Documents%Education%U +ls ~/.local/state/nvim/swap//%home%slnopriv%Documents%Education%U +ls ~/.local/state/nvim/swap/* +rm -rf ~/.local/state/nvim/swap/* +ls ~/.local/state/nvim/swap/* +gdb ./a.out +unil +cd os/os-exercise-2/ +./a.out +cat T1.c +unil +cd inetsec23/ +ll +cd ex1/ +ll +nvim tcpchat.c +unil +cd os/os-exercise-2/ +nvim T1.c +rm .aout +rm a.out +ll +git add -A +git commit -m "Reomve useless print statement" +git push +nvim T1.c +nvim T2.c +git add -A +git commit -m "Add mean and median for T2.c " +git push +nvim T2.c +man pthread_t +man pthread +man pthread_self +man 7 pthread_self +man 2 pthread_self +man 3 pthread_self +ls -a +cd dl +ll +dnf install * +su seb +uname -r +find /boot/* +su seb +uname -r diff --git a/bash/.bash_history-66458.tmp b/bash/.bash_history-66458.tmp new file mode 100644 index 0000000..e69de29 diff --git a/bash/.bash_logout b/bash/.bash_logout new file mode 100644 index 0000000..af7c6fd --- /dev/null +++ b/bash/.bash_logout @@ -0,0 +1,2 @@ +# ~/.bash_logout + diff --git a/bash/.bash_profile b/bash/.bash_profile new file mode 100644 index 0000000..55136b9 --- /dev/null +++ b/bash/.bash_profile @@ -0,0 +1,8 @@ +# .bash_profile + +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# User specific environment and startup programs diff --git a/bash/bashrc b/bash/bashrc new file mode 100644 index 0000000..86a3a29 --- /dev/null +++ b/bash/bashrc @@ -0,0 +1,68 @@ +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# User specific environment +if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] +then + PATH="$HOME/.local/bin:$HOME/bin:$PATH" +fi +export PATH + +# Uncomment the following line if you don't like systemctl's auto-paging feature: +# export SYSTEMD_PAGER= + +# User specific aliases and functions +if [ -d ~/.bashrc.d ]; then + for rc in ~/.bashrc.d/*; do + if [ -f "$rc" ]; then + . "$rc" + fi + done +fi + +unset rc + +source /home/slnopriv/alacritty/extra/completions/alacritty.bash +eval "$(starship init bash)" + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/home/slnopriv/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/home/slnopriv/anaconda3/etc/profile.d/conda.sh" ]; then + . "/home/slnopriv/anaconda3/etc/profile.d/conda.sh" + else + export PATH="/home/slnopriv/anaconda3/bin:$PATH" + fi +fi +unset __conda_setup +# <<< conda initialize <<< + +# cd to fs23 pids exercises +alias cdpex='cd ~/Documents/Education/UniBas/FS23/pids23/exercises/pids_2023/exercises/' + +# cd into nextcloud unibas fs23 +alias uni23='cd ~/Nextcloud/Documents/Unibas/FS23/' + +#cd into thoc +alias thoc='cd ~/Nextcloud/Documents/Unibas/FS23/thoc/' +#cd into inetsec +alias inetsec='cd ~/Nextcloud/Documents/Unibas/FS23/inetsec/' +#cd into os alias +alias os='cd ~/Nextcloud/Documents/Unibas/FS23/os/' +#cd into pkvps +alias pkvps='cd ~/Nextcloud/Documents/Unibas/FS23/pkvps/' +#cd into pids +alias pids='cd ~/Nextcloud/Documents/Unibas/FS23/pids/' + +#rsync Books from Cloud +alias syncbooks='rsync -av ~/Nextcloud/Books/ ~/Books' + +#cd to local uni stuff +alias unil='cd ~/Documents/Education/UniBas/FS23' diff --git a/git/gitconfig b/git/gitconfig new file mode 100644 index 0000000..5d93e68 --- /dev/null +++ b/git/gitconfig @@ -0,0 +1,3 @@ +[user] + email = 74497638+sebaschi@users.noreply.github.com + name = Sebastian Lenzlinger diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..69e00e4 --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,114 @@ +"Comments in Vimscript start with a `"`. + +" If you open this file in Vim, it'll be syntax highlighted for you. + +" Vim is based on Vi. Setting `nocompatible` switches from the default +" Vi-compatibility mode and enables useful Vim functionality. This +" configuration option turns out not to be necessary for the file named +" '~/.vimrc', because Vim automatically enters nocompatible mode if that file +" is present. But we're including it here just in case this config file is +" loaded some other way (e.g. saved as `foo`, and then Vim started with +" `vim -u foo`). +set nocompatible + +" Turn on syntax highlighting. +syntax on + +" Disable the default Vim startup message. +set shortmess+=I + +" Show line numbers. +set number + +" This enables relative line numbering mode. With both number and +" relativenumber enabled, the current line shows the true line number, while +" all other lines (above and below) are numbered relative to the current line. +" This is useful because you can tell, at a glance, what count is needed to +" jump up or down to a particular line, by {count}k to go up or {count}j to go +" down. +set relativenumber + +" Always show the status line at the bottom, even if you only have one window open. +set laststatus=2 + +" The backspace key has slightly unintuitive behavior by default. For example, +" by default, you can't backspace before the insertion point set with 'i'. +" This configuration makes backspace behave more reasonably, in that you can +" backspace over anything. +set backspace=indent,eol,start + +" By default, Vim doesn't let you hide a buffer (i.e. have a buffer that isn't +" shown in any window) that has unsaved changes. This is to prevent you from " +" forgetting about unsaved changes and then quitting e.g. via `:qa!`. We find +" hidden buffers helpful enough to disable this protection. See `:help hidden` +" for more information on this. +" set hidden + +" This setting makes search case-insensitive when all characters in the string +" being searched are lowercase. However, the search becomes case-sensitive if +" it contains any capital letters. This makes searching more convenient. +set ignorecase +set smartcase + +" Enable searching as you type, rather than waiting till you press enter. +set incsearch + +" Unbind some useless/annoying default key bindings. +nmap Q " 'Q' in normal mode enters Ex mode. You almost never want this. + +" Disable audible bell because it's annoying. +set noerrorbells visualbell t_vb= + +" Enable mouse support. You should avoid relying on this too much, but it can +" sometimes be convenient. +set mouse+=a + +" Try to prevent bad habits like using the arrow keys for movement. This is +" not the only possible bad habit. For example, holding down the h/j/k/l keys +" for movement, rather than using more efficient movement commands, is also a +" bad habit. The former is enforceable through a .vimrc, while we don't know +" how to prevent the latter. +" Do this in normal mode... +nnoremap :echoe "Use h" +nnoremap :echoe "Use l" +nnoremap :echoe "Use k" +nnoremap :echoe "Use j" +" ...and in insert mode +inoremap :echoe "Use h" +inoremap :echoe "Use l" +inoremap :echoe "Use k" +inoremap :echoe "Use j" + +" Highlight cursor line underneath the cursor horizontally +set cursorline + +" +" Highlight cursor line underneath the cursor vertically +set cursorcolumn + +" Show the mode you are on the last line. +set showmode + +" Do not let cursor scroll below or above N number of lines when scrolling. +set scrolloff=15 + +" Enable auto completion menu after pressing TAB. +set wildmenu + +" Make wildmenu behave like similar to Bash completion. +set wildmode=list:longest + +" There are certain files that we would never want to edit with Vim. +" Wildmenu will ignore files with these extensions. +set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx + +" Highlight matching parentheses +set showmatch + +" Map semicolon to colon except if double pressed +nnoremap ; ; +map ; : + +set shiftwidth=4 smarttab +set expandtab +set tabstop=8 softtabstop=0