dotfiles-linux-bash/config/nvim/init.vim

100 lines
2.7 KiB
VimL
Raw Normal View History

syntax enable
2020-05-06 14:23:54 +00:00
let mapleader = " "
call plug#begin('~/.vim/plugged')
2021-11-04 00:38:25 +00:00
Plug 'ervandew/supertab'
Plug 'preservim/nerdtree'
2021-10-30 00:43:31 +00:00
Plug 'liuchengxu/space-vim-dark'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'mhinz/vim-startify'
Plug 'jeetsukumaran/vim-buffergator'
2021-11-04 00:38:25 +00:00
Plug 'ap/vim-buftabline'
Plug 'airblade/vim-gitgutter'
2021-11-04 00:38:25 +00:00
Plug 'majutsushi/tagbar'
Plug 'vim-airline/vim-airline'
2021-10-29 21:25:22 +00:00
" Plug 'ctrlpvim/ctrlp.vim' " Replaced with telescope
2021-11-04 00:38:25 +00:00
Plug 'enricobacis/vim-airline-clock'
2021-10-29 21:25:22 +00:00
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
2021-11-10 19:26:55 +00:00
Plug 'thoughtbot/vim-rspec'
Plug 'voldikss/vim-floaterm'
2021-11-30 19:10:01 +00:00
Plug 'fatih/vim-go'
2021-12-10 20:36:49 +00:00
Plug 'andweeb/presence.nvim'
2020-05-06 14:23:54 +00:00
call plug#end()
map <C-o> :NERDTreeToggle<CR>
2020-05-06 14:23:54 +00:00
set tabstop=2
set shell=/bin/bash
set shiftwidth=2
set expandtab
set hidden
set background=dark
2021-10-30 00:43:31 +00:00
set autoindent
set preserveindent
set copyindent
" Set Colors
if (has("termguicolors"))
set termguicolors
endif
colorscheme space-vim-dark
hi Comment cterm=italic
2020-05-06 14:23:54 +00:00
" Relative numbers and when not in buiffer set absolute numbers
set number relativenumber
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
2021-10-30 00:43:31 +00:00
" Disable EX Mode
map q: <Nop>
" Disable EX Mode
nnoremap Q <nop>
" Search with Ag
2020-05-06 14:23:54 +00:00
nnoremap <Leader>/ :Ag<CR>
nnoremap <C-J> :bnext<CR>
nnoremap <C-K> :bprev<CR>
nmap <leader>bq :bp <BAR> bd #<CR>
"Clock
let g:airline#extensions#clock#format = '%I:%M:%S %X'
2021-10-29 21:25:22 +00:00
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
2021-11-10 19:26:55 +00:00
" nnoremap <leader>ft <cmd>Telescope help_tags<cr>
2021-10-30 00:43:31 +00:00
2021-11-10 19:26:55 +00:00
" RSpec.vim mappings
map <Leader>rt :call RunCurrentSpecFile()<CR>
map <Leader>rs :call RunNearestSpec()<CR>
map <Leader>rl :call RunLastSpec()<CR>
map <Leader>ra :call RunAllSpecs()<CR>
2021-10-30 00:43:31 +00:00
let g:python_host_prog = '~/.nvim.pythonenv2/bin/python'
let g:python3_host_prog = '~/.nvim.pythonenv/bin/python'
2021-11-10 19:26:55 +00:00
" Floaterm
let g:floaterm_keymap_toggle = '<F9>'
let g:floaterm_width = 0.85
let g:floaterm_height = 0.85
2021-12-10 20:36:49 +00:00
"DISCORD PLUGIN
" General options
let g:presence_auto_update = 1
let g:presence_neovim_image_text = "The One True Text Editor"
let g:presence_main_image = "nvim"
" Rich Presence text options
let g:presence_editing_text = "Editing %s"
let g:presence_file_explorer_text = "Browsing %s"
let g:presence_git_commit_text = "Committing changes"
let g:presence_plugin_manager_text = "Managing plugins"
let g:presence_reading_text = "Reading %s"
let g:presence_workspace_text = "Working on %s"
let g:presence_line_number_text = "Line %s out of %s"