Skip to content

Instantly share code, notes, and snippets.

@bougui505
Last active August 29, 2015 13:56
Show Gist options
  • Save bougui505/9232256 to your computer and use it in GitHub Desktop.
Save bougui505/9232256 to your computer and use it in GitHub Desktop.
.vimrc for ishikawa
" ishikawa
" choose colorscheme according to vim version
syntax on
set t_Co=256
set gfn=DejaVu\ Sans\ Mono\ 11
"set gfn=DejaVu\ LGC\ Sans\ Mono\ 11
" No highlight search
set nohls
" No error bell
set noeb
" Visual bell
set vb
" Allow backspace to delete
set bs=2
"remove toolbar
set guioptions-=T
"remove right-hand scroll bar
set guioptions-=r
"allow folding of recognized files
"set foldmethod=indent
"souris
"set mouse=a
set mouse=
set ttymouse=xterm2
" Background color
set bg=light
" Pour activer les numéros de lignes dans la marge :
"set number
"To highlight current line and column
set cursorline cursorcolumn
" Afficher en permanence la barre d'état (en plus de la barre de commande) :
set laststatus=2
" Format de la barre d'état (tronquée au début, fichier, flags, :
set statusline=%<%f%m\ %r\ %h\ %w%=%l,%c\ %p%%
" Largeur du caractère tab
set tabstop=4
" Largeur de l'indentation de la touche tab
set softtabstop=4
" Remplace les tab par des espaces
set expandtab
" comments with F2 key
map <F2> :s/^/#/<CR> :let @/=""<CR>
map <F3> :s/^#//<CR> :let @/=""<CR>
set expandtab
set shiftwidth=4
set autoindent
set smartindent
au BufWinLeave * mkview
au BufWinEnter * silent loadview
" python code completion
autocmd FileType python set omnifunc=pythoncomplete#Complete
colorscheme summerfruit256
highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline
set list
set listchars=nbsp:¤,tab:>-,extends:>,precedes:<,trail:·
set nowrapscan " No backward search
" Auto commands for scriptin
autocmd BufNewFile *.sh,*.bash 0put =\"#!/bin/bash\"|
\ 1put=\"# -*- coding: UTF8 -*-\<nl>\<nl>\"|$
autocmd BufNewFile *.py 0put=\"#!/usr/bin/env python\"|
\ 1put=\"# -*- coding: UTF8 -*-\<nl>\<nl>\"|
\ 2put=\"\\"\\"\\"\"|
\ 3put=\"author: Guillaume Bouvier\"|
\ 4put=\"email: guillaume.bouvier@ens-cachan.org\"|
\ 5put=\"creation date: <date time>\"|
\ 6put=\"license: GNU GPL\"|
\ 7put=\"Please feel free to use and modify this, but keep the above information.\"|
\ 8put=\"Thanks!\"|
\ 9put=\"\\"\\"\\"\"|$
autocmd BufWritePre,FileWritePre *.py ks|call LastMod()|'s
fun LastMod()
if line("$") > 20
let l = 20
else
let l = line("$")
endif
exe "1," . l . "g/creation date: /s/creation date: .*/creation date: " .
\ strftime("%Y %m %d")
endfun
autocmd BufNewFile *.c 0put=\"#include <stdio.h>\"|
\ 1put=\"#include <stdlib.h>\"|$
autocmd BufNewFile *.java
\ 0put=\"import java.util.Scanner;\"|
\ 2put=\"public class \".expand('%:t:r').\"{\"|
\ 3put=\"}\"|$
au FileType java inoremap <buffer> <C-t> System.out.println();<esc>hi
" Make file executable if #! /bin/
function ModeChange()
if getline(1) =~ "^#!"
if getline(1) =~ "/bin/"
silent !chmod a+x <afile>
endif
endif
endfunction
au BufWritePost * call ModeChange()
" grammatical correction
let g:languagetool_jar='/Bis/home/bougui/lib/LanguageTool-2.2/languagetool-commandline.jar'
" Completion
filetype plugin on
set omnifunc=syntaxcomplete#Complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment