LF Advice: VIM/TMUX Environment For Python

Jimmy McBride - Jan 16 '20 - - Dev Community

I have recently started the Computer Science section at Lambda School and we have started learning python! I'm so excited! Also, I've decided that this would be the perfect time to start that deep dive with VIM that I've been wanting to take. And surprisingly it's going a lot better than I expected so far!

Like the title said I'm using VIM and TMUX. Trying to get my .vimrc on point and just learning in general. I only have NERDTree as far as plugins go, I'd rather do everything I can in my .vimrc file and be as minimal with plugins as possible. I have the space bar set as my leader key and TMUX prefix is set to CTRL + A.

What are your favorite settings in your .tmux.conf and your .vimrc? What are the keybindings you have set that you feel are the most impactful for your workflow? What plugins can't you live without? If you could go back to when you first started to embark on your VIM/TMUX journey, what advice would you give yourself? What advice would you give me? I'd love to hear your thoughts in the comments below! Thanks in advance. 🚀

Here are my config files below so you guys can see what I already have:

.tmux.conf

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

# Start window numbering at 1
set -g base-index 1
Enter fullscreen mode Exit fullscreen mode

.vimrc

set nocompatible
filetype off

call pathogen#infect()
call plug#begin('~/.vim/plugged')

Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }


call plug#end()

filetype plugin indent on

syntax enable
command! MakeTags !ctags -R .

" Set's leader key to SPACE
let mapleader = ' '

" Some basics
set number
set smartindent
set tabstop=8
set shiftwidth=4
set softtabstop=4
set expandtab
set path+=**
set wildmenu
set splitbelow
set splitright
set noswapfile

" Toggles NERDTree on and off
nnoremap <Leader>t :NERDTreeToggle<Enter>
" Saves file and runs python code from normal mode
nnoremap <Leader>i :w<CR>:!clear;python %<CR>
" Saves file and runs python code from insert mode
inoremap <C-i> <Esc>:w<CR>:!clear;python %<CR>

" HTML:5 Snippet
nnoremap html :-1read $HOME/.vim/snippets/HTML5_template.html<Enter>6j3wa

" deletes a pair of (), [], {}, or <>
nnoremap .dp ma%x`ax

" Gives you doubles
inoremap " ""<Left>
inoremap { {}<Left>
inoremap ( ()<Left>
inoremap [ []<Left>
inoremap < <><Left>

inoremap ii <Esc>
" CTRL + d backspaces and deletes from insert mode 
" (Mainly for deleting double quotes or brackets if I didn't mean it.)
inoremap <c-d> <Backspace><Delete>
" Thinking about making A LOT OF THESE!!!!
inoremap <h1 <h1></h1><Left><Left><Left><Left><Left>

" split screen navigations:
" ctrl + j = move to split screen below
nnoremap <C-J> <C-W><C-J>
" ctrl + k = move to split screen above
nnoremap <C-K> <C-W><C-K>
" ctrl + l = move to split screen right
nnoremap <C-L> <C-W><C-L>
" ctrl + h = move to split screen left
nnoremap <C-H> <C-W><C-H>

Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player