Last active
August 2, 2018 08:44
-
-
Save n1zzo/0904199582932a2b69ddd960f86eb299 to your computer and use it in GitHub Desktop.
Text Editing Basic Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g mouse on | |
# make scrolling with wheels work | |
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" | |
bind -n WheelDownPane select-pane -t= \; send-keys -M | |
# Emulate scrolling by sending up and down keys if these commands are running in the pane | |
tmux_commands_with_legacy_scroll="nano less more man git" | |
bind-key -T root WheelUpPane \ | |
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \ | |
'send -Mt=' \ | |
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \ | |
"send -t= Up" "copy-mode -et="' | |
bind-key -T root WheelDownPane \ | |
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \ | |
'send -Mt=' \ | |
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \ | |
"send -t= Down" "send -Mt="' | |
# Powerline | |
# source "/home/nico/.local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Limit mutt text width to 72 chars. | |
au BufRead /tmp/mutt-* set tw=72 | |
syn on se title | |
filetype plugin indent on | |
" Use spaces for indention (python) | |
:set tabstop=4 shiftwidth=4 expandtab | |
" Use spaces for indention (kernel) | |
":set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab | |
" Use spaces for indention (cpp) | |
":set expandtab shiftwidth=2 softtabstop=2 | |
" Show line numbers | |
:set nu | |
" Disable line wrap | |
:set nowrap | |
" Highlight search pattern matches | |
:set hlsearch | |
" Set system clipboard as default one | |
:set clipboard=unnamed | |
" Highlight 80 chars column limit | |
:set colorcolumn=80 | |
hi ColorColumn ctermbg=0 | |
" Enable vim-airline | |
:set laststatus=2 | |
" Vim-plug | |
call plug#begin('~/.vim/plugged') | |
" ctrlp.vim | |
Plug 'https://github.com/ctrlpvim/ctrlp.vim' | |
" vim-airline | |
Plug 'vim-airline/vim-airline' | |
" vim-airline-themes | |
Plug 'vim-airline/vim-airline-themes' | |
" vim auto-pairs | |
Plug 'jiangmiao/auto-pairs' | |
" vim-gitgutter | |
Plug 'airblade/vim-gitgutter' | |
" vim-flake8 | |
Plug 'nvie/vim-flake8' | |
" vim-multiple-cursors | |
Plug 'terryma/vim-multiple-cursors' | |
" vim-table-mode | |
Plug 'dhruvasagar/vim-table-mode' | |
" vim-opencl | |
Plug 'petRUShka/vim-opencl' | |
" supertab | |
Plug 'ervandew/supertab' | |
" rust | |
Plug 'rust-lang/rust.vim' | |
" vim-surround | |
Plug 'tpope/vim-surround' | |
" Markdown-style tables | |
let g:table_mode_corner='|' | |
" Add plugins to &runtimepath | |
call plug#end() | |
" Enable mouse yanking | |
:set mouse+=a | |
" Enable powerline fonts for vim-airline | |
:let g:airline_powerline_fonts = 1 | |
" Set vim-airline theme | |
:let g:airline_theme='badwolf' | |
" Enable 256 colors mode | |
:set t_Co=256 | |
" Enable row and column highlighting | |
:set cursorline | |
:set cursorcolumn | |
:hi CursorLine cterm=NONE ctermbg=black ctermfg=white | |
:hi CursorColumn cterm=NONE ctermbg=black ctermfg=white | |
" Space to insert single character | |
:nnoremap <Space> i_<Esc>r | |
" Disable middle button paste | |
:map <MiddleMouse> <Nop> | |
:imap <MiddleMouse> <Nop> | |
:map <2-MiddleMouse> <Nop> | |
:imap <2-MiddleMouse> <Nop> | |
:map <3-MiddleMouse> <Nop> | |
:imap <3-MiddleMouse> <Nop> | |
:map <4-MiddleMouse> <Nop> | |
:imap <4-MiddleMouse> <Nop> | |
:map <5-MiddleMouse> <Nop> | |
:imap <5-MiddleMouse> <Nop> | |
" Alias unnamed clipboard to system clipboard | |
:set clipboard=unnamedplus | |
" Allow pattern matching with special characters | |
:set magic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment