未加星标

Lightweight dotfiles for bash and vim

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏
Improved shell ENVironment

This is a set of opinioned dotfiles used by me in daily work and in production. The goal is to have robust, customizable and portable set of defaults for linux bash shell for daily work.


Lightweight dotfiles for bash and vim

Testedon macOS and linux hosts.

Table of Contents Features Installation Customizing / Extending Shell GIT Vim Did you know ...? Known issues Features easy to customize / extend space aware smart/adaptive prompt highlighted error exit codes optimized for solarized colors handy aliases (system, git, etc) time of last activity fast git integration (current branch, branch state, defaults) root and remote host indicator sane vim defaults (pathogen, ctrlp, list-chars, solarized theme, ag-integration, tweaks, ...) readline tweaks tmux support respect non-interactive sessions Installation git clone https://github.com/denyskoch/ienv ~/.ienv && ~/.ienv/install.sh

You should also install Solarized color theme for your terminal. ( ethanschoonover.com/solarized )

For faster and better fuzzy search results install ag the silver searcher:

brew install ag Customizing / Extending

You can edit and customize your .baschrc, .vimrc, .tmux.conf as usual. IENV is integrated gracefully (no symlinks, no file copies), so things should not break. Take a look at your .bashrc for example:

... ### IENV ### [ -r ~/.ienv/entrypoint ] && source ~/.ienv/entrypoint ### VNEI ###

Since its just an include, you can simple add or override settings you like.

Dark color theme Simply switch terminal color theme e.g. solarized dark:
Lightweight dotfiles for bash and vim
Shell

automatically cd to directory:

/work $ kitchen cd -- kitchen /work/kitchen $

auto correct wrong spelled directories

/work/demo $ ls abc bar foo /work/demo $ cd bra /work/demo/bar $

search in bash history with arrow keys e.g.:

/work/demo/bar $ ssh<arrow up> Aliases common

pw: generate strong password with help of openSSL

h: show history

hs: history search (i.e. history | grep -i)

..: go one directory up

...: go two directories up

....: go three directories up

dl: go to downloads folder i.e. cd ~/Downloads

* p : go to project directory i.e. cd ~/Projects

gp: go to GO workspace i.e. cd $GOPATH

ll: long list i.e. ls -ahl

ips: show current IPs

$ ips Public: 95.208.248.59 Local: 192.168.0.164 Gateway: 192.168.0.1 git and related g : shortcut for git s : git status a <files> : git add ( a -A to add all files) c : git commit cm <msg> : git commit -m d : git diff co <branch> : git checkout l : fancy git log (graph) macOS update : update software and brew software flushdns : clear dns cache hidedesktop / showdesktop : Hide/show all desktop icons (useful when presenting) Remote Shell for remote hosts/shels the hostname is printed on the right root shells looks dangerous for more attention and prevent upss
Lightweight dotfiles for bash and vim
GIT

push strategy is set to simple

default editor is vim

colors set to auto

gobal gitignore for annoying OS generated files:

.DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes __MACOSX ehthumbs.db Thumbs.db Desktop.ini *~ *.swp *.swo Vim persistend undos: you can even undo after vim is closed and opened again silver searcher (ag) integration for CtrlP custom status line auto folding of deep nested blocks easy split and buffer movement some shortcuts ctrl + p to start fuzzy search ctrl + n for auto complete some normal mode commands / shortcuts ctrl + j , ctrl + k , ctrl + h , ctrl + l for split movement z to toggle fold under cursor gd go to definition J (shift + j) switch to next buffer K (shift + k) switch to previous buffer
Lightweight dotfiles for bash and vim
Lightweight dotfiles for bash and vim

dark color theme (e.g. solarized-dark)

insert to your in your ~/.vimrc file:

set background=dark
Lightweight dotfiles for bash and vim
Did you know ...?

you can simply toggle between last used directories:

/work/demo/foo $ cd /work/ /work $ cd - /work/demo/foo $ /work/demo/foo $ cd - /work $

cdwithout arguments return you back to $HOME

killall <name> kill process by name (alternative to kill <pid> )

Known issues

Feel free to open a new issue on GitHub.

macOS bash bash: shopt: autocd: invalid shell option name bash: shopt: dirspell: invalid shell option name bash: update_terminal_cwd: command not found

Since macOS is using a old version of bash, this errors will occur.

Bash v4+ is required, you can install it via brew brew install bash ( brew.sh )

Vim issues in dark terminals

If you use dark terminal theme, you need to add set background=dark to your .vimrc

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: GitGitHub
tags: work,git,cd,go,demo,dark,bash,your,ctrl
分页:12
转载请注明
本文标题:Lightweight dotfiles for bash and vim
本站链接:http://www.codesec.net/view/561355.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(35)