Skip to content

Commit

Permalink
Split set and remap in specific plugin files
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Berri committed Feb 18, 2021
1 parent 3045d6f commit 1783412
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 257 deletions.
30 changes: 30 additions & 0 deletions .vim/plugin/remaps.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
""" All remaps are here

" Move across buffers
" next buffer
nnoremap <C-l> :bn<CR>
" previous buffer
nnoremap <C-h> :bp<CR>
" first buffer
nnoremap <C-j> :bf<CR>
" last buffer
nnoremap <C-k> :blast<CR>
" quick edit .vimrc
nnoremap <leader>ev :split $MYVIMRC<cr>
" quick source .vimrc
nnoremap <leader>sv :source $MYVIMRC<cr>
" Easy split
noremap \| :vsplit<CR>
noremap _ :split<CR>
" Disable arrow keys
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
" re-sync syntax highlighting
nnoremap <leader><leader><CR> <Esc>:syntax sync fromstart<CR>
83 changes: 83 additions & 0 deletions .vim/plugin/sets.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
""" Set options

" add number and relative numbers on the left
set number
set relativenumber

" deactivate search highlighting
set nohlsearch
" but highlight the first match
set incsearch

" uses indents of 2 spaces. Keep these commands together as they should be
" changed at once. See :help tabstop for suggestion of working combinations
" tab are actually spaces (type Ctrl-V<Tab> to insert a real tab and use
" command :retab to change all existing tab to the new style
" to remove the tab conversion enter ':set noexpandtab'
set shiftwidth=2 softtabstop=2 tabstop=2 expandtab
set autoindent

" don't make it look like there are line breaks where there aren't:
set nowrap

" disable modeline
set nomodeline

" " to disable text formatting, uncomment the followin
" set formatoptions-=t
" set textwidth=79

" " to disable wrapping
" set tw=0


" set search case sensitive
" set noignorecase
" set search case insensitive untill a capital letter is used. still use \c
" and \C for forcing case insesitive or case sensitive searches
set smartcase
" to put it back case sensitive type :set ignorecase

" give special character
set listchars=eol:$,tab:¬·,trail:␣,extends:>,precedes:<

" uses syntax to perform folding (zc and zo to Close or Open folding
" here for more details on folding
" http://www.vim.org/htmldoc/fold.html#fold-commands
"
" TO DISABLE
" set nofoldenable

" if you indent correctly the following migh be more useful
set foldmethod=indent
" do not open files already folded
set nofoldenable


" set a nice colorsheme for a dark background
" for a bright background this would be better
" colorscheme slate
set background=dark

if &diff
syntax off
colorscheme apprentice
else
colorscheme elflord
endif

" Activate syntax autocpmpletion (Ctrl-n)
set omnifunc=syntaxcomplete#Complete

" Allow hidden buffers
" A hidden buffer is a buffer with some unsaved modifications and is not
" displayed in a window.
set hidden


" option to set the backspace to work (delete) in cygwin
set backspace=2

""" Graphical settings
set guifont=Monaco:h14

132 changes: 0 additions & 132 deletions .vim/plugin/vundle.vim

This file was deleted.

Loading

0 comments on commit 1783412

Please sign in to comment.