summaryrefslogtreecommitdiff
path: root/.vimrc
blob: 84fdb1ccecf846402e81458df39ba823dcc8fc72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

Plugin 'autozimu/LanguageClient-neovim'

Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-speeddating'
Plugin 'tpope/vim-fugitive'

Plugin 'vim-latex/vim-latex'
Plugin 'vim-scripts/ReplaceWithRegister'


Plugin 'vim-erlang/vim-erlang-runtime'

Plugin 'zchee/deoplete-jedi'
Plugin 'leafgarland/typescript-vim'
Plugin 'sirtaj/vim-openscad'
Plugin 'tmhedberg/matchit'
Plugin 'nanotech/jellybeans.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'Shougo/deoplete.nvim'

Plugin 'agude/vim-eldar'

Plugin 'scrooloose/nerdtree'

call vundle#end()            " required
filetype plugin indent on    " required


colorscheme eldar

syntax enable
set number relativenumber

set tabstop=4
set shiftwidth=4
set softtabstop=4
set noexpandtab

let g:deoplete#enable_at_startup = 1


inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"


tnoremap <C-e> <C-\><C-n>

" Map C-s
noremap <silent> <C-S>     :update<CR>

" Make ToBegin and ToEnd
function! InputChar()
    let c = getchar()
    return type(c) == type(0) ? nr2char(c) : c
endfunction

function! ToEnd()
    let s =  InputChar()
    if s =~ "\<esc>" || s =~ "\<c-c>"  
        return
    endif
    execute "normal! vi". s. "\<Esc>"
endfunction

function! ToBegin()
    call ToEnd()
    execute "'<"
endfunction

nnoremap <silent> ge :call ToEnd()<cr>
nnoremap <silent> gb :call ToBegin()<cr>

map <C-n> :NERDTreeToggle<CR>

" Required for operations modifying multiple buffers like rename.
set hidden

let g:LanguageClient_serverCommands = {
    \ 'rust': ['rustup', 'run', 'stable', 'rls'],
    \ }

nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>