Instantly share code, notes, and snippets.

@gaulinmp /.screenrc
Last active Apr 24, 2018

Embed
What would you like to do?
screenrc and associated files
# Don't display the copyright page
startup_message off
# keep scrollback n lines
defscrollback 3000
# load ipython and my flask site in background, zsh in foreground.
screen -t py 0 bash -c 'jupyter lab; exec bash'
screen -t htop 1 bash -c 'htop; exec bash'
screen 2 zsh
# get IP address from python script
backtick 101 3600 0 ~/bin/whatismyip
# Host name | time / date | IP | load
caption always "%{+b rk}%H%{gk} | %c %{yk}%d.%m.%Y | %101` |%72=Load: %l %{wk}"
# TERM NUMBER$ name, active in white, inactive in default
hardstatus alwayslastline "%?%{dd}%-Lw%?%{wk}%n*%f %t%?(%u)%?%?%{dd}%+Lw%?"
set number
set encoding=utf-8
set hlsearch
set nocompatible
set ai
set ruler
set incsearch
set tabstop=4
set shiftwidth=4
set expandtab
set splitbelow
set splitright
set directory^=$HOME/.vim_swap//
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin('~/Dropbox/Documents/Personal/config/Linux/vim/vundle/')
Plugin 'gmarik/Vundle.vim'
" Add all your plugins here
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Bundle 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
" wrap up call to vundle
call vundle#end() " required
filetype plugin indent on " required
" Python --------------------------------------------- Python "
autocmd FileType python set complete+=k~/.vim/syntax/python.vim isk+=.,(
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
let g:SimpylFold_docstring_preview=1
" Set up tabbing and python syntax whitespace stuff
au BufNewFile,BufRead *.py
\ set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79
\ expandtab autoindent fileformat=unix
" Set up the autocomplete functionality
let g:ycm_autoclose_preview_window_after_completion=1
" map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
" Syntax highlighting:
let python_highlight_all=1
syntax on
if has('gui_running')
set background=dark
colorscheme solarized
else
colorscheme zenburn
call togglebg#map("<F5>")
endif
" Javascript --------------------------------------------- Javascript "
autocmd FileType javascript set complete+=k~/.vim/syntax/javascript.vim isk+=.,(
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ softtabstop=2
\ shiftwidth=2
#!/usr/bin/env python
# sh is on pipy, so "pip install sh"
import sh
print([x.split('inet addr:')[-1].split()[0] for x in sh.ifconfig().split("\n\n") if x.startswith('e')][0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment