From 09ece8738d009664411d81d389d0d9b24c821838 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 4 Apr 2021 09:44:06 +0200 Subject: [PATCH] basic bash and vim added --- bashrc | 34 ++++++++++++++++++++++++++++++++++ vimrc | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 bashrc create mode 100644 vimrc diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..c3d141f --- /dev/null +++ b/bashrc @@ -0,0 +1,34 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' + +set -o vi + +bind 'set show-all-if-ambiguous on' +bind 'set completion-ignore-case on' +bind 'TAB:menu-complete' + +HISTSIZE=50000 +HISTFILESIZE=100000 +shopt -s histappend + +bind '"\e[A": history-search-backward' +bind '"\e[B": history-search-forward' + +alias clr="clear" + +function mkcd { + mkdir "$@" && builtin cd "$@" +} + +alias cz="cd .. && ls" +alias czz="cd ../.. && ls" +alias czzz="cd ../../.. && ls" +alias czzzz="cd ../../../.. && ls" + + diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..2685f0e --- /dev/null +++ b/vimrc @@ -0,0 +1,51 @@ +set nocompatible + +colorscheme elflord + +syntax enable + +set showmatch +set nu +set relativenumber +set incsearch +set hlsearch +set tabstop=2 +set softtabstop=0 +set expandtab +set shiftwidth=2 +set smarttab +set clipboard=unnamedplus +set shell=bash + +nnoremap tn :tabnew +nnoremap tk :tabnext +nnoremap tj :tabprev +nnoremap th :tabfirst +nnoremap tl :tablast + +let mapleader = "," + +set wrap linebreak nolist + +nnoremap hl :nohls + +function! Smart_TabComplete() + let line = getline('.') + let substr = strpart(line, -1, col('.')+1) + let substr = matchstr(substr, "[^ \t]*$") + if (strlen(substr)==0) + return "\" + endif + let has_period = match(substr, '\.') != -1 + let has_slash = match(substr, '\/') != -1 + if (!has_period && !has_slash) + return "\\" +" elseif ( has_slash ) + else + return "\\" + endif +endfunction + +inoremap =Smart_TabComplete() + +