From b9d839b5235ed56644d145abc436e1d91b3b456e Mon Sep 17 00:00:00 2001 From: Harry Roberts Date: Wed, 29 Jun 2016 12:14:44 +0100 Subject: [PATCH] Add CSS comment macros --- .vimrc | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/.vimrc b/.vimrc index 1c308e4..0e3c707 100644 --- a/.vimrc +++ b/.vimrc @@ -2,7 +2,7 @@ " Setup -" Let’s use Pathogen +" Let‚Äôs use Pathogen execute pathogen#infect() " Space as a Leader let mapleader = "\" @@ -31,6 +31,11 @@ set runtimepath^=~/.vim/bundle/ctrlp.vim +" Set the dimmed colour for Limelight +let g:limelight_conceal_ctermfg = 'LightGrey' + + + " NERDTree " Run NERDTree as soon as we launch Vim... @@ -75,6 +80,8 @@ set spell set iskeyword-=_ " No extra spaces when joining lines set nojoinspaces +" Interpret numbers with leading zeroes as decimal, not octal +set nrformats= @@ -95,9 +102,9 @@ set whichwrap=h,l,b,<,>,~,[,] " Show status line set laststatus=2 -" Show what mode you’re currently in +" Show what mode you‚Äôre currently in set showmode -" Show what commands you’re typing +" Show what commands you‚Äôre typing set showcmd " Allow modelines set modeline @@ -107,7 +114,7 @@ set ruler set title " Show invisibles set list -set listchars=tab:>-,trail:· +set listchars=tab:>-,trail:¬∑ " Set relative line numbers if we can... if exists("+relativenumber") " Due to a problem with relative line numbers not persisting across new @@ -115,7 +122,7 @@ if exists("+relativenumber") set nonumber " ..then set relative ones... set relativenumber - " ...otherwise let’s just have regular ones + " ...otherwise let‚Äôs just have regular ones else set number endif @@ -125,14 +132,14 @@ if exists("+colorcolumn") endif " Force cursor onto a new line after 80 characters set textwidth=80 -"Highlight current line +" Highlight current line set cursorline " Search -" Don’t keep results highlighted after searching... +" Don‚Äôt keep results highlighted after searching... set nohlsearch " ...just highlight as we type set incsearch @@ -166,6 +173,8 @@ nnoremap :echoe "Use j" map Y y$ " `vv` to highlight just the text (i.e. no indents) in a line map vv ^vg_ +" ` iI " Switch to previous window map ` " Vim-like window navigation @@ -175,6 +184,10 @@ map k map l " `G` skips to bottom of file and places line in middle of screen nnoremap G :norm! Gzz +" `gf` opens file under cursor in a new vertical split +nnoremap gf :vertical wincmd f +" `gF` opens file under cursor in a new split +nnoremap gF f " Make keypad function correctly map Oq 1 @@ -210,5 +223,22 @@ map! + map! OS - map! OM + + " Abbreviations and auto-completions + +" lipsum drops some Lorem ipsum text into the document iab lipsum Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. +" Set up a section-level comment +iab comsec +\/* ========================================================================== +\# +\========================================================================== */ +" Set up a sub-level comment +iab comsub +\/* +\========================================================================== */ +" Running the `@c` macro will always insert a section-level comment +let @c = 'O^Mcomsec><80>kbjk2?*^M^Vkr A' +" Running the `@x` macro will always insert a sub-level comment +let @x = 'O^Mcomsub><80>kbjk^[^r kA '