Skip to content

Instantly share code, notes, and snippets.

@flxw
Created March 18, 2017 10:19
Show Gist options
  • Save flxw/424a4eb3609efcdfe4f953dccf6f21eb to your computer and use it in GitHub Desktop.
Save flxw/424a4eb3609efcdfe4f953dccf6f21eb to your computer and use it in GitHub Desktop.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
fontFamily: '"Inconsolata for Powerline"',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
cursorShape: 'BLOCK',
// set to `true` (without backticks) if you're using a Linux setup that doesn't show native menus
// default: `false` on Linux, `true` on Windows (ignored on macOS)
showHamburgerMenu: '',
// set to `false` if you want to hide the minimize, maximize and close buttons
// additionally, set to `'left'` if you want them on the left, like in Ubuntu
// default: `true` on windows and Linux (ignored on macOS)
showWindowControls: '',
// custom padding (css format, i.e.: `top right bottom left`)
padding: '12px 14px',
// the full list. if you're going to provide the full color palette,
// including the 6 x 6 color cubes and the grayscale map, just provide
// an array here instead of a color map object
// the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
// if left empty, your system's login shell will be used by default
// make sure to use a full path if the binary name doesn't work
// (e.g `C:\\Windows\\System32\\bash.exe` instad of just `bash.exe`)
// if you're using powershell, make sure to remove the `--login` below
shell: 'C:\\Windows\\System32\\bash.exe',
// for setting shell arguments (i.e. for using interactive shellArgs: ['-i'])
// by default ['--login'] will be used
shellArgs: ['--login'],
// for environment variables
env: {},
// set to false for no bell
bell: 'false'
},
// a list of plugins to fetch and install from npm
// format: [@org/]project[#version]
// examples:
// `hyperpower`
// `@company/project`
// `project#1.0.1`
plugins: ["hyperterm-gruvbox-dark", "hyperterm-tab-icons"],
// in development, you can create a directory under
// `~/.hyper_plugins/local/` and include it here
// to load it and avoid it being `npm install`ed
localPlugins: []
};
set nocompatible " required
filetype on " required
" General behavior
set backspace=indent,eol,start " backspace over everything in insert mode
set laststatus=2 " The value of this option influences when the last window will have a status line
set ignorecase
set smartcase " will automatically switch to a case-sensitive search if you use capital letters
au FocusLost * silent! wa " Autosave on focus lost
" Filetypes:
" Python
au BufNewFile,BufRead *.py
\ set expandtab | " enter spaces when tab is pressed
\ set textwidth=79 | " break lines when line length increases
\ set tabstop=4 | " use 4 spaces to represent tab
\ set softtabstop=4 |
\ set shiftwidth=4 | " number of spaces to use for auto indent
\ set autoindent | " copy indent from current line when starting a new line
\ set fileformat=unix
" Web (doesn't seem to work)
au BufNewFile,BufRead *.js,*.html,*.css,*.json
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2
" Plugins:
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
let bundlepath='~/.vim/bundle'
call vundle#begin(bundlepath)
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
"Bundle 'Valloric/YouCompleteMe'
Plugin 'morhetz/gruvbox'
Plugin 'chriskempson/base16-vim'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdcommenter'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'Chiel92/vim-autoformat'
Plugin 'airblade/vim-gitgutter'
Plugin 'junegunn/goyo.vim'
Plugin 'tpope/vim-surround'
Plugin 'pangloss/vim-javascript'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" Plugin: NERDTree
" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" open NERDTREE with CTRL-N
map <C-n> :NERDTreeToggle<CR>
let NERDTreeIgnore=['\.pyc$', '__pycache__']
" Plugin: Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_mode_map={ 'mode': 'passive' }
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_check_on_open=1
let g:syntastic_check_on_wq=0
let g:syntastic_loc_list_height=3
let g:syntastic_python_python_exec='/usr/local/bin/pytest3'
let g:syntastic_javascript_checkers = ['jscs']
" Plugin: YouCompleteMe
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
" Plugin: SimpylFold
let g:SimpylFold_fold_docstring=0
let g:SimpylFold_docstring_preview=1
" Plugin: CtrlP
nnoremap <Leader>m :CtrlPBufTag<CR>
map <C-t> :CtrlPBufTag<CR>
let g:ctrlp_extensions = ['buffertag']
" Plugin: Airline
"let g:airline_theme='gruvbox'
let g:airline_theme='base16'
let g:airline_powerline_fonts=1
set encoding=utf-8
" Appearance
colorscheme gruvbox " base16-ocean
"let base16colorspace=256
set background=dark
set nu
let python_highlight_all=1
syntax on
set nohlsearch
" Change cursor shape between insert and normal mode in iTerm2.app
"let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
"let $NVIM_TUI_ENABLE_TRUE_COLOR=1
"if $TERM_PROGRAM =~ "iTerm"
" let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode
" let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode
"endif
" Enable folding
set foldmethod=syntax
set foldlevel=99
" Indentation behaviour
set expandtab
set shiftwidth=2
set softtabstop=2
" Mappings:
nnoremap <Leader>f :Autoformat<CR>
nnoremap <Leader>g :GitGutterToggle<CR>
" Functions
function! WC()
let filename = expand("%")
let cmd = "detex " . filename . " | wc -w | tr -d [:space:]"
let result = system(cmd)
echo result . " words"
endfunction
command WC call WC()
@bschley
Copy link

bschley commented Apr 28, 2017

Nutzt du Hyper als Terminal fuer dein Subsystem oder hast du Hyper auf dein Linux Subsystem installiert?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment