Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: panthomakos/dotfiles
base: 8bcf27ff3f
...
head fork: panthomakos/dotfiles
compare: 28df8b1330
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 09, 2012
@panthomakos Add rename current file functionality for vim. 0458d8c
@panthomakos Refactor the vimrc file.
* Change mapping for markdown preview.
* Start organizing file by groups.
* Remove some commented commands.
* Remove faster movement commands. Use <C-D> and <C-U> instead.
* Make CommandT use a non-flush by default so that it's faster.
28df8b1
Showing with 34 additions and 30 deletions.
  1. +14 −0 .vim/plugin/rename.vim
  2. +20 −30 .vimrc
View
14 .vim/plugin/rename.vim
@@ -0,0 +1,14 @@
+" Rename the current file or move it to a new directory.
+
+function! RenameFile()
+ let old_name = expand('%')
+ let new_name = input('New file name: ', expand('%'))
+ if new_name != '' && new_name != old_name
+ exec ':saveas ' . new_name
+ exec ':silent !rm ' .old_name
+ redraw!
+ endif
+endfunction
+
+map <leader>n :call RenameFile()<cr>
+
View
50 .vimrc
@@ -25,7 +25,7 @@ function! PreviewHeightWorkAround()
endif
endfunc
-nnoremap <leader>p :!ronn --html %<CR>
+map <leader>m :!ronn --html %<CR>
set statusline=%<%f\ (%{&ft})\ %-4(%m%)%=%-19(%3l,%02c%03V%)
hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
@@ -52,22 +52,23 @@ set list
" Edit files in the current directory
cnoremap %% <C-R>=expand('%:h').'/'<cr>
-" Highlight Search
-set hlsearch
-map <Leader>k :let @/ = ""<CR>
-
-" Number lines
-set number
-
-" Highlight the current line
-set cursorline
-
-" Make searches case-sensitive only if they contain upper-case characters
-set ignorecase
-set smartcase
-
-" Use par as the format program
-set formatprg=par
+""""""""""
+" Settings
+""""""""""
+set hlsearch " Highlight searches.
+set number " Number lines.
+set cursorline " Highlight the current line.
+set ignorecase " Make searches case insensitive.
+set smartcase " Make searches case-sensitive if they contain upper-case.
+set formatprg=par " Use par as the format program.
+
+""""""""""""""""""""""""""
+" Convenience Key Mappings
+""""""""""""""""""""""""""
+" Insert a hash rocket.
+imap <c-l> <space>=><space>
+" Clear the search buffer.
+nnoremap <cr> :nohlsearch<cr>
" Set spelling on and off using <leader>s
nmap <silent> <leader>sp :set spell!<CR>
@@ -102,12 +103,6 @@ syntax enable
set background=dark
color grb256
-" set t_Co=256
-" syntax enable
-" set background=dark
-" let g:solarized_termcolors=256
-" color solarized
-
" Show syntax highlighting groups for word under cursor
nmap <leader>syn :call <SID>SynStack()<CR>
function! <SID>SynStack()
@@ -123,14 +118,9 @@ noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
-" Faster movement
-map fj 20j
-map fk 20k
-map fh 20h
-map fl 20l
-
" CommandT
-map <leader>f :CommandTFlush<CR>\|:CommandT<CR>
+map <leader>f :CommandT<CR>
+map <leader>cf :CommandTFlush<CR>\|:CommandT<CR>
let g:CommandTCancelMap=['<ESC>']
let g:CommandTCursorLeftMap=['<Left>']
let g:CommandTBackspaceMap=['<C-h>']

No commit comments for this range

Something went wrong with that request. Please try again.