Merge pull request #1 from Pendosv/dev

Dev
This commit is contained in:
TheK4n 2021-09-16 01:36:23 +03:00 committed by GitHub
commit 549d8b2fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 22 deletions

View File

@ -1,13 +1,27 @@
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# colors
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# navigate
alias ls='ls -F --color=auto'
alias l.='ls -dhF .* --color=auto'
alias ll='ls -lhF --color=auto'
alias la='ls -aF --color=auto'
else
alias ls='ls -F'
alias l.='ls -dhF .*'
alias ll='ls -lhF'
alias la='ls -aF'
fi
# navigate
alias l.='ls -dh .* --color=auto'
alias ll='ls -lh --color=auto'
alias la='ls -a --color=auto'
alias mkdir='mkdir -pv'
alias cd..='cd ..'
@ -17,7 +31,6 @@ alias ...='cd ../..'
alias path='echo -e ${PATH//:/\\n}'
# shorts
alias c='clear'
alias q='exit'
@ -44,10 +57,3 @@ alias vis='vim "+set si"'
# net
alias ports='netstat -tulanp'

13
.bashrc
View File

@ -1,4 +1,17 @@
if type shopt 2>/dev/null 1>&2; then
# corrections
shopt -s cdspell
shopt -s dirspell
shopt -s histappend
PROMPT_COMMAND='history -a'
fi
export HISTSIZE=10000
export HISTIGNORE="&:l[lsa]:[bf]g:exit:q:clear:c:history:h"
parse_git_branch() {
branch="$(git branch --show-current 2> /dev/null)"

6
.vimrc
View File

@ -28,7 +28,7 @@ set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set smartindent
set noerrorbells
set novisualbell
@ -55,7 +55,3 @@ nnoremap <C-k> :tabnext<CR>
let NERDTreeShowBookmarks = 1
let NERDTreeIgnore = ['\.pyc$', '\.swp', '\.swo', '\.vscode', '__pycache__']

View File

@ -13,6 +13,7 @@
## Content
* [Project description](#chapter-0)
* [SSH](#chapter-1)
* [Tips](#chapter-2)
<a id="chapter-0"></a>
@ -22,7 +23,7 @@ Bash config files
<a id="chapter-1"></a>
## SSH:
## SSH
Create ssh key on local device
@ -46,4 +47,28 @@ Using aliases:
```bash
ssh host_name
sftp host_name
```
```
<a id="chapter-2"></a>
## Tips
### Bash
| Command | Description |
|:------------------: | :------------------ |
|```Esc + .``` | Last object |
|```Ctrl + R``` | bash_history search |
|```history -d 130``` | Delete 130 line |
|```history -c``` | Delete all history |
### Vim
| Command | Description |
|:------------------: | :------------------------------------ |
|```Ctrl + [``` | Analog Esc |
|```d -> ctrl + end``` | Delete from cursor to end of file |
| ```u``` | Cancel last command |
| ```ctrl+r``` | Cancel cancel |
| ```22G``` | Go to line 22 |
<h1 align="center"><a href="#top"></a></h1>