Must be a really old building.
The moment I stepped out of the bus station, I almost felt as though I were in some North American city. Glasgow, at least on a Saturday morning, is so much more my kind of city than sleepy Edinburgh…
Off to the bus station I go — Glasgow today, London next week. I do worry that I’ll regret choosing Edinburgh over Glasgow…
@gtwilson Won’t have a computer tomorrow, but I’ll check it on Debian on Sunday.
CLI tools have a tendency to be a bit weird on OS X =.=
@gtwilson The vim statusline config at the bottom was just added in to have something until I got lightline working.
set visualbell
"Reload files changed outside vim
set autoread
"Vim statusline and word count function
" Update the count when cursor is idle in command or insert mode.
" Update when idle for 1000 msec (default is 4000 msec).
set updatetime=1000
augroup WordCounter
au! CursorHold,CursorHoldI * call UpdateWordCount()
augroup END
" Set statusline, shown here a piece at a time
highlight User1 ctermbg=grey guibg=grey ctermfg=black guifg=black
set statusline=%1* " Switch to User1 color highlight
set statusline+=%<%F " file name, cut if needed at start
set statusline+=%M " modified flag
set statusline+=%y " file type
set statusline+=%= " separator from left to right justified
set statusline+=\ %{WordCount()}\ words,
set statusline+=\ %l/%L\ lines ",\ %P " percentage through the file
@gtwilson Yep:
set nocompatible
"nerdcommenter options
let g:NERDSpaceDelims = 1 "Add spaces after comment delimiters by default
let g:NERDTrimTrailingWhitespace = 1 "Enable trimming of trailing whitespace when uncommenting
let g:NERDCompactSexyComs = 1 "Use compact syntax for prettified multi-line comments
let g:NERDDefaultAlign = 'left' "Align line-wise comment delimiters flush left instead of following code indentation
let g:NERDAltDelims_java = 1 "Set a language to use its alternate delimiters by default
let g:NERDCommentEmptyLines = 1 "Allow commenting and inverting empty lines (useful when commenting a region)
"lightline
if !has('gui_running')
set t_Co=256
endif
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'mode_map': { 'c': 'NORMAL' },
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ]
\ },
\ 'component_function': {
\ 'modified': 'LightLineModified',
\ 'readonly': 'LightLineReadonly',
\ 'fugitive': 'LightLineFugitive',
\ 'filename': 'LightLineFilename',
\ 'fileformat': 'LightLineFileformat',
\ 'filetype': 'LightLineFiletype',
\ 'fileencoding': 'LightLineFileencoding',
\ 'mode': 'LightLineMode',
\ },
\ 'separator': { 'left': '⮀', 'right': '⮂' },
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
\ }
function! LightLineModified()
return &ft =~ 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-'
endfunction
function! LightLineReadonly()
return &ft !~? 'help\|vimfiler\|gundo' && &readonly ? '⭤' : ''
endfunction
function! LightLineFilename()
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
\ (&ft == 'vimfiler' ? vimfiler#get_statusstring() :
\ &ft == 'unite' ? unite#getstatusstring() :
\ &ft == 'vimshell' ? vimshell#getstatus_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
endfunction
function! LightLineFugitive()
if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head")
let branch = fugitive#head()
return branch !=# '' ? '⭠ '.branch : ''
endif
return ''
endfunction
function! LightLineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightLineFiletype()
return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
endfunction
function! LightLineFileencoding()
return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : ''
endfunction
function! LightLineMode()
return winwidth(0) > 60 ? lightline#mode() : ''
endfunction
set laststatus=2
"---
"vimrc 2016-09-29 written for MacVim; taken from http://marcgg.com/blog/2016/03/01/vimrc-example/ and https://gist.github.com/joegoggins/8482408
"Colours, appearance
filetype on
syntax on
colorscheme Tomorrow-Night-Eighties
set guifont=Menlo\ Regular:h16
"Line numbers
set number
set relativenumber
highlight LineNr term=bold cterm=NONE ctermfg=WHITE ctermbg=NONE gui=NONE guifg=WHITE guibg=NONE
"Show incomplete commands at the bottom
set showcmd
"Show current mode at the bottom
set showmode
"The default leader key is backslash. Have decided to keep it this way.
"Declares "please map (Leader key+s) to the following command: :source ~/.vimrc then press Enter" — this reload the Vim configuration.
map <leader>s :source ~/.vimrc<CR>
"This makes vim act like all other editors, buffers canexist in the background without being in a window. http://items.sjbach.com/319/configuring-vim-right
set hidden
set history=1000
"Indent logic
filetype indent on
set wrap "This is basically soft wrapping
set linebreak "Wrap lines at convenient points
set tabstop=4
set shiftwidth=4
"set expandtab "This inserts spaces when tab is inserted
set smartindent
set autoindent
"When running a search, get Vim to highlight found words:
set hlsearch
"Cancel a search with Escape:
nnoremap <silent> <Esc> :nohlsearch<Bar>:echo<CR>
"When selecting a parenthesis, highlight the matching one:
set showmatch
"No sounds
Totally stumped. Lightline (which is supposed to make the statusline very informative) isn't displaying properly in vim or MacVim. This looks like vim's default statusline, which suggests…that the plugin's being ignored?
@gtwilson Any ideas?
Anyone else using (Mac)Vim with Lightline?
@skematica Not a bad investment, actually.
I'd save one for myself as protection when visiting certain areas too.
// @matigo @jussipekonen
@phoneboy There isn't one — by the time you said it, everyone would have finished their drink.
// @jussipekonen