From c95e3339c2afef9731b0efa92ec30c5e4315e9da Mon Sep 17 00:00:00 2001 From: templis Date: Sun, 29 Jul 2018 01:50:51 +0200 Subject: [PATCH] =?UTF-8?q?Ein=20paar=20=C3=A4nderungen=20Vorallen=20angef?= =?UTF-8?q?angen=20neovim=20from=20scratch=20zu=20bauen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/init.vim | 54 +++++++++++++++++++++++++++++++++++++++++++ .config/nvim/nvimrc | 2 ++ .i3/config | 4 ++-- .oh-my-zsh | 2 +- .zshrc | 7 ++++++ 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .config/nvim/init.vim create mode 100644 .config/nvim/nvimrc diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..ccf11e0 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,54 @@ +"Map the leader key to SPACE +let mapleader="\" + +set showmatch " Show matching brackets. +set number " Show the line numbers on the left side. +set formatoptions+=o " Continue comment marker in new lines. +set expandtab " Insert spaces when TAB is pressed. +set tabstop=4 " Render TABs using this many spaces. +set shiftwidth=4 " Indentation amount for < and > commands. +set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) + +" More natural splits +set splitbelow " Horizontal split below current. +set splitright " Vertical split to right of current. +if !&scrolloff + set scrolloff=3 " Show next 3 lines while scrolling. +endif +if !&sidescrolloff + set sidescrolloff=5 " Show next 5 columns while side-scrolling. +endif +set nostartofline " Do not jump to first character with page commands. +if &listchars ==# 'eol:$' + set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ +endif +set list " Show problematic characters. +" Also highlight all tabs and trailing whitespace characters. +highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen +match ExtraWhitespace /\s\+$\|\t/ +set ignorecase " Make searching case insensitive +set smartcase " ... unless the query has capital letters. +set gdefault " Use 'g' flag by default with :s/foo/bar/. + +" Use to clear the highlighting of :set hlsearch. +if maparg('', 'n') ==# '' + nnoremap :nohlsearch +endif + +" Search and Replace +nmap s :%s//g + +" Relative numbering +function! NumberToggle() + if(&relativenumber == 1) + set nornu + set number + else + set rnu + endif +endfunc + +" Toggle between normal and relative numbering. +nnoremap r :call NumberToggle() + +command W :execute ':silent w !sudo tee % > /dev/null' | :edit! diff --git a/.config/nvim/nvimrc b/.config/nvim/nvimrc new file mode 100644 index 0000000..eec544c --- /dev/null +++ b/.config/nvim/nvimrc @@ -0,0 +1,2 @@ +command W :execute ':silent w !sudo tee % > /dev/null' | :edit! +syntax on diff --git a/.i3/config b/.i3/config index e6c0e64..3d4c9fb 100644 --- a/.i3/config +++ b/.i3/config @@ -338,7 +338,7 @@ exec nm-applet # eye saver #Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. -exec redshift-gtk +exec redshift-gtk -l 48.52160730:9.05050278 # nextcloud exec nextcloud @@ -347,7 +347,7 @@ exec nextcloud exec --no-startup-id i3-msg 'workspace 1: Text; exec urxvt -depth 32 -bg rgba:3f00/3f00/3f00/dddd -ip -fg white -sl 10000 +sb -fn "xft:inconsolata:size=8" -letsp -1 -sh 20' # trayicon to listen to some radio stations -exec radiotray +exec radiotray-ng # start i3 with a random wallpaper exec feh --randomize --bg-fill ~/Bilder/Wallpaper/* diff --git a/.oh-my-zsh b/.oh-my-zsh index 62b8a70..c99844d 160000 --- a/.oh-my-zsh +++ b/.oh-my-zsh @@ -1 +1 @@ -Subproject commit 62b8a70a7c5d0c939d8dabfef48796a092d1a55f +Subproject commit c99844d84891076dceb5638bd6f4ad1599358cea diff --git a/.zshrc b/.zshrc index 197ba89..a4c12cd 100644 --- a/.zshrc +++ b/.zshrc @@ -103,6 +103,13 @@ source /usr/share/zsh/plugins/zsh-dircolors-solarized/zsh-dircolors-solarized.zs sudo /sbin/iptables -A block-traffic-from-openbl -p tcp -s $line -j REJECT --reject-with tcp-reset done } +function inventarisierung { + NETZ=$(ip route | awk '/scope link/ {print $1}') + read "KUNDE?Bitte Kundenurl eingeben: " + sudo nmap -v -O -oG ~/cloud.tueit.de/Kunden/$KUNDE/$KUNDE.txt $NETZ + grep "OS:" ~/cloud.tueit.de/Kunden/$KUNDE/$KUNDE.txt | sed 's/Host: //' | sed 's/Ports.*OS://' | sed 's/Seq.*$//' | sed 's/(//' | sed 's/)//' + grep "OS:" ~/cloud.tueit.de/Kunden/$KUNDE/$KUNDE.txt | sed 's/Host: //' | sed 's/Ports.*OS://' | sed 's/Seq.*$//' | sed 's/(//' | sed 's/)//' | awk '{print "\"" $1 "\";\""$2"\";\"" $3 " " $4 " " $5 " " $6 " " $7 " " $8 " " $9 " " $10 " " $11 " " $12 " " $13 " " $14 "\""}' >~/cloud.tueit.de/Kunden/$KUNDE/$KUNDE.csv +} # add some PERL Path variables PATH="$HOME/perl5/bin${PATH+:}${PATH}"; export PATH;