" Be IMproved if &compatible set nocompatible endif " set leader key let g:mapleader="\\" " alias for leader key nmap \ xmap \ syntax enable " Enables syntax highlighing set hidden " Required for specific actions that require multiple buffers set nowrap " display long lines as just one line set encoding=utf-8 " The encoding displayed set fileencoding=utf-8 " The encoding written to file set ruler " show the cursor position all the time set iskeyword+=- " treat dash separated words as a word text object" set mouse=a " Enable your mouse set splitbelow " Horizontal splits will automatically be below set splitright " Vertical splits will automatically be to the right set t_Co=256 " Support 256 colors set autochdir " Your working directory will always be the same as your working directory set tabstop=4 " Insert 4 spaces for a tab set shiftwidth=4 " Change the number of space characters inserted for indentation set smarttab " Makes tabbing smarter will realize you have 2 vs 4 set expandtab " Converts tabs to spaces set smartindent " Makes indenting smart set autoindent " Good auto indent set laststatus=2 " Always display the status line set number " Line numbers set cursorline " Enable highlighting of the current line set background=dark " tell vim what the background color looks like let g:python_highlight_all = 0 " Get rid of annoying red highlights" let g:elite_mode=1 " Disable arrows" " Disable arrow movement, resize splits instead. if get(g:, 'elite_mode') nnoremap :resize -2 nnoremap :resize +2 nnoremap :vertical resize -2 nnoremap :vertical resize +2 endif " Gives vim abilty to recognize filetypes filetype plugin indent on " Alternate way to save nnoremap :w " Alternate way to quit nnoremap :wq! " Use control-c instead of escape nnoremap " : completion. inoremap pumvisible() ? "\" : "\" " Open terminal with F1 nnoremap :10split term://bash " insert mode for terminal autocmd BufWinEnter,WinEnter term://* startinsert autocmd BufLeave term://* stopinsert " Toggle tagbar "nnoremap :TagbarToggle " Toggle Line numbers "nnoremap :set nonumber! " Toggle NERDTree "nnoremap :NERDTreeToggle " Startify "nnoremap :Startify " Get rid of highlights after search "nnoremap :nohlsearch " Toggle open buffers " nnoremap :BuffergatorToggle " For fuzzy finder ""nnoremap :Files " F10 split vertical "nnoremap :vsplit " F11 split horizontal "nnoremap :split " Make current buffer only buffer "nnoremap :only " Remap window switch " Switch to rename for LSP to do add leader ""nnoremap :SearchTasks * nnoremap n :NERDTreeToggle nnoremap m :TagbarToggle nnoremap l :set nonumber! nnoremap o :only nnoremap s :Startify nnoremap w :w nnoremap p :pclose nnoremap bu :BuffergatorToggle nnoremap gy :Goyo nnoremap hi :nohlsearch nnoremap hs :split nnoremap vs :vsplit nnoremap gh :call LanguageClient_textDocument_hover() nnoremap gd :call LanguageClient_textDocument_definition() nnoremap gr :call LanguageClient_textDocument_rename() nnoremap gc :call LanguageClient_contextMenu() nnoremap fr :call LanguageClient_textDocument_references() " This is a funtion to open any file with (key sequence) fun! OpenConfigFile(file) if (&filetype ==? 'startify') execute 'e ' . a:file else execute 'tabe ' . a:file endif endfun nnoremap in :call OpenConfigFile('~/.config/nvim/init.vim') nnoremap bashrc :call OpenConfigFile('~/.bashrc') nnoremap h nnoremap j nnoremap k nnoremap l " Remap terminal switch tnoremap tnoremap tnoremap h tnoremap j tnoremap k tnoremap l " TAB in general mode will move to text buffer nnoremap :bnext " SHIFT-TAB will go back nnoremap :bprevious