Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

FamDav posted:

the syntax highlighting/indenting/stuff on
tabs to spaces so you dont gently caress up our bespoke codebase
comma leader
double-j for exiting insert mode
semicolon to colon

oh hey all those seem nice and cool I gue--

FamDav posted:

unmap arrows :getin:

:stare:

why

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



vim is my go-to log analysis tool

double sulk
Jul 2, 2010

Nomnom Cookie posted:

vim is my go-to log analysis tool

please dont post about your poo poo analysis utility

FamDav
Mar 29, 2008

It's like when they teach kids to ski without poles - if you never give them a crutch then they'll never learn to use it.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

gucci void main posted:

excuse me, please remove "terrible" from that sentence as it is causing redundancy

when did you become shaggar junior?

GameCube
Nov 21, 2006

visual studio + viemu supremacy

GameCube
Nov 21, 2006

FamDav posted:

oh then lol.

i was put in charge of the default vimrc for work and it amounts to

the syntax highlighting/indenting/stuff on
tabs to spaces so you dont gently caress up our bespoke codebase
comma leader
double-j for exiting insert mode
semicolon to colon
unmap arrows :getin:

and if people get bored and want help then i show them how to set up vundle and go hog wild.

post ur vimrc

in fact somebody make a vim thread already

double sulk
Jul 2, 2010

Werthog 95 posted:

post ur vimrc

in fact somebody make a vim thread already

no dont

FamDav
Mar 29, 2008

Werthog 95 posted:

post ur vimrc

in fact somebody make a vim thread already

there's a vim thread in the CoC.

but sure

code:
" Environment {

   " Initialization {

      set nocompatible
      filetype off
      set rtp+=~/.vim/bundle/vundle/
      call vundle#rc()

   " }

   " Bundles {

      if filereadable(expand("~/.vimrc.bundles"))
         source ~/.vimrc.bundles
      endif

   " }

" }

" Settings {

   " Enable syntax and plugins
   syntax on
   filetype plugin indent on

   " Define colorscheme
   set background=dark
   colorscheme molokai

   " Convert tabs to spaces
   set expandtab

   " Do not create swap files
   set noswapfile

   " Use UTF for character encoding
   set encoding=utf-8

   " leave 3 lines between cursor and screen edge when scrolling
   set scrolloff=3
   
   " Copy indent from previous line
   set autoindent

   " Current mode appears at bottom of window
   set showmode

   " Show information about current command at bottom of window
   set showcmd

   " Show hidden characters
   set hidden

   " Completes to longest common command prefix and then allows
   " tabbing through commands
   set wildmenu
   set wildmode=longest:full,full

   " No audio bell
   set visualbell

   " Highlight current cursor line
   set cursorline

   " Helps with draw speed (?)
   set ttyfast

   " Gives cursor location in bottom-right-hand corner
   set ruler

   " Makes backspace work over auto-inserted indents and over line breaks
   set backspace=indent,eol,start

   " Always show status line
   set laststatus=2

   " Show invisible characters (?)
   "set list

   " Sets the list of invisible characters
   "set listchars=tab:▸\ ,eol:¬

   " Save files when focus is lost
   au FocusLost * :wa
   
   " Fold based on syntax of filetype
   set foldmethod=syntax

   " Auto-fold starting at the 8th ply
   set foldlevelstart=8
   
   " Text wrapping {

      " Automatically wraps texts after {textwidth} characters
      set wrap

      " Do not break mid-word
      set nolist
      set linebreak
      
      " Number of characters on a line before a line wrap is automatically
      " inserted
      set textwidth=79

      " q -> Allow formatting of comments with "gq"
      "
      " r -> Automatically insert current comment leader after hitting
      "        <Enter> in insert mode
      "
      " n -> When formatting text, recognize numbered lists.  This actually 
      "        uses the 'formatlistpat' option, thus any kind of list can be
      "        used.  The indent of the text after the number is used for the
      "        next line.  The default is to find a number, optionally followed 
      "        by '.', ':', ')', ']' or '}'.  Note that 'autoindent' must be 
      "        set too.  Doesn't work well together with "2".
      "        Example: >
      "           1. the first item
      "              wraps
      "           2. the second item
      "
      " 1 -> Don't break a line after a one-letter word.  It's broken before 
      "        it instead (if possible).
      set formatoptions=qrn1

      " Visualizes where textwrap will occur
      set colorcolumn=80

   " }

   " Search {

      " Ignore case in search when pattern is all lowercase
      set smartcase

      " Default to subsitute multiple times per line. Use g to
      " disable this behavior
      set gdefault

      " Highlights search results
      set hlsearch

      " Search as search string is typed
      set incsearch

      " Show search results as search string is typed
      set showmatch

   " }

   " Specifically for higher versions of VIM {

      if version >= 703
         " Default to relative numbering
         set relativenumber

         " Set absolute numbering in insert mode
         autocmd InsertEnter * :set number

         " Set relative numbering otherwise
         autocmd InsertLeave * :set relativenumber

         " Use an undo file
         set undofile
      endif

   " }

   " Plugin Settings {

      if filereadable(expand("~/.vimrc.plugins.settings"))
         source ~/.vimrc.plugins.settings
      endif

   " }

" }

" KeyBindings {

   " Global Leader Key
   let mapleader = ","

   " Rebind for leaving insert mode
   inoremap jj <ESC>
   
   " Rebind search to use magic mode
   nnoremap / /\v
   vnoremap / /\v

   " Removes highlighted search results
   nnoremap <leader><space> :noh<cr>


   " Unmap arrows {

      nnoremap <up> <nop>
      nnoremap <down> <nop>
      nnoremap <left> <nop>
      nnoremap <right> <nop>
      inoremap <up> <nop>
      inoremap <down> <nop>
      inoremap <left> <nop>
      inoremap <right> <nop>

   " }

   " Remap j/k to move by displayed lines {

      nnoremap j gj
      nnoremap k gk

   " }

   " fold ply
   nnoremap <leader>ff za
   
   " Strip trailing whitespace
   nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>

   " Shortcut for opening .vimrc in a new split
   nnoremap <leader>ev <C-w><C-v><C-l>:e $MYVIMRC<cr>


   " Shortcut for new vertical split
   nnoremap <leader>w <C-w>v<C-w>l

   " Moving around splits {

      nnoremap <C-h> <C-w>h
      nnoremap <C-j> <C-w>j
      nnoremap <C-k> <C-w>k
      nnoremap <C-l> <C-w>l

   " }

   " have semicolon default to colon in normal and visual mode
   nnoremap ; :
   vnoremap ; :

   " Plugin Keybindings {

      if filereadable(expand("~/.vimrc.plugins.keybindings"))
         source ~/.vimrc.plugins.keybindings
      endif

   " }


" }

" Filetype Presets {

   " General {

      au BufRead,BufNewFile *.* set tabstop=3
      au BufRead,BufNewFile *.* set shiftwidth=3
      au BufRead,BufNewFile *.* set softtabstop=3

   " }

   " pro*C presets {

      au BufRead,BufNewFile *.pc set filetype=esqlc

   " }

   " YACC presets {

      au BufRead,BufNewFile *.ypp set filetype=yacc

   " }

   " Haskell presets {

      au BufRead,BufNewFile *.hs set tabstop=4
      au BufRead,BufNewFile *.hs set shiftwidth=4
      au BufRead,BufNewFile *.hs set softtabstop=4
      au BufEnter *.hs compiler ghc

   " }

   " OCAML presets {

      autocmd FileType ocaml source /Users/EddardFuckingStark/.opam/system/share/typerex/ocp-indent/ocp-indent.vim

   " }

" }
EDIT: There's at least one mislabeled setting. Can you find it?

FamDav fucked around with this message at 17:44 on Jun 24, 2013

Socracheese
Oct 20, 2008

Nomnom Cookie posted:

vim is my go-to log analysis tool

vim owns but use tail -f for this

a cyberpunk goose
May 21, 2007

New job report: I'm in week 4 and they haven't figured out I'm a bad programmer yet.

Right now I'm wearing the hat of a mobile app developer who is too poor to afford a smart phone. I hope when they find the body of the man I swapped identities for, that I will have enough leadtime to disappear.

Nomnom Cookie
Aug 30, 2009



Socracheese posted:

vim owns but use tail -f for this

by log analysis i mean look at a 100,000 line log file to figure out why something didn't work right

GameCube
Nov 21, 2006

FamDav posted:

tabstop=3

:stare:

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Socracheese posted:

vim owns but use tail -f for this

tail -f is scrubby, less -R filename followed by "F" to follow the end owns way more

Console.app or splunk are obviously the best

X-BUM-RAIDER-X
May 7, 2008

gucci void main posted:

excuse me, please remove "terrible" from that sentence as it is causing redundancy

can we get a :sulksay: emote??

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Once I realized I could export editor=subl I stopped ever having to use vim.

MeruFM
Jul 27, 2010
when you're so autistic that you don't understand why someone else could have a different preference

programmer thread general

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

FamDav posted:

code:
      au BufEnter *.hs compiler ghc
      autocmd FileType ocaml source /Users/EddardFuckingStark/.opam/system/share/typerex/ocp-indent/ocp-indent.vim
be consistent, use au or autocmd, not both

and there's no reason whatsoever for using these short not self-explanatory 2 letters commands in a loving config file.


also I'm Eddard *loving* Stark

Shaggar
Apr 26, 2006

MeruFM posted:

when you're so autistic that you don't understand why someone else could have a different preference

programmer thread general

Actually in programming there are right and wrong ways to do things. Using a text editor for "coding" is a common symptom of doing-things-wrong.

FamDav
Mar 29, 2008

Symbolic Butt posted:

be consistent, use au or autocmd, not both

and there's no reason whatsoever for using these short not self-explanatory 2 letters commands in a loving config file.


also I'm Eddard *loving* Stark

i probably just copied those from configs for a plugin. also extra letters means extra time means closer to death

MrMoo
Sep 14, 2000

Symbolic Butt posted:

the Unix environment is my IDE

I'm a wizard bitches



Uses his magic to hold test tubes without a thumb, not advanced enough to hold a test tube with no fingers.

X-BUM-RAIDER-X
May 7, 2008

Shaggar posted:

Actually in programming there are right and wrong ways to do things. Using a text editor for "coding" is a common symptom of doing-things-wrong.

same but replace 'text editor' with 'lovely 70 dollar program that does the exact same thing as programs 40 years its senior'

GameCube
Nov 21, 2006

hey idiots just install the vim plugin for ur ide and ur set

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

OBAMA BIN LinkedIn posted:

same but replace 'text editor' with 'lovely 70 dollar program that does the exact same thing as programs 40 years its senior'

you know sublime text is completely free to use, it just pops up every few hours with a "hey, trial version" message that is very easy to dismiss.

just give it a shot

FamDav
Mar 29, 2008

Werthog 95 posted:

hey idiots just install the vim plugin for ur ide and ur set

i actually really hate these because they dont have full support for all vim commands and its like why reimplement what is already perfect

i do use vs for c# and id probably use idea for java if i coded java.

weird
Jun 4, 2012

by zen death robot
I used to use vim for everything but then I started writing Lisp and started using Emacs for that and then I just started using Emacs for everything

Posting Principle
Dec 10, 2011

by Ralp

OBAMA BIN LinkedIn posted:

same but replace 'text editor' with 'lovely 70 dollar program that does the exact same thing as programs 40 years its senior'

does your job not pay for your tools?

Stringent
Dec 22, 2004


image text goes here

Jerry SanDisky posted:

does your job not pay for your tools?

just his salary

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
what if you ask for sublime and your boss pays for it and then you're an rear end and go like "you know what VIM IS BETTER i love my vimrc" and never use sublime

I'm just wondering if the boss would get pissed for this or if they just don't care.

Squinty Applebottom
Jan 1, 2013

my boss watches me type and judges me on posture, wpm, and tools of choice

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
if your work lets you use vim they probably don't give a poo poo about anything

a cyberpunk goose
May 21, 2007

chumpchous posted:

if your work lets you use vim they probably don't give a poo poo about anything

my boss literally has aspergers and codes firmware in C with emacs

he's a super cool dude actually and gets a lot done, hth :shobon:

use the tools that enable YOU (you personally, not you generally) be productive and get stuff done, your tool could be notepad.exe and you could be judged eternally for it but if for some horrible reason you have a medical condition that prevents you from using a modern editor/ide and notepad.exe is all you can manage to get things done with then w/e, meet deadlines and write good code, tia

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Mido posted:


use the tools that enable YOU (you personally, not you generally) be productive and get stuff done, your tool could be notepad.exe and you could be judged eternally for it but if for some horrible reason you have a medical condition that prevents you from using a modern editor/ide and notepad.exe is all you can manage to get things done with then w/e, meet deadlines and write good code, tia

wrong

BONGHITZ
Jan 1, 1970

Symbolic Butt posted:

the Unix environment is my IDE

I'm a wizard bitches



im the cat

also the bag of poot

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug
sublime is good because out of the box all you gotta do is pick a different color theme and it already works better than vim or emacs default config

i would have no problem paying $200 for an emacs config that worked as well as sublime defaults

uG
Apr 23, 2003

by Ralp
poors ITT

big scary monsters
Sep 2, 2011

-~Skullwave~-
i've been using sublime since people were last bitching about it itt a week or two ago, its p nice although id prefer it if someone just wrote a decent python ide

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

prefect posted:

visual studio? how about intellij idea?

visual studio has been a bad text editor since >= 2005

<= 2003 was fairly good though

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

big scary monsters posted:

i've been using sublime since people were last bitching about it itt a week or two ago, its p nice although id prefer it if someone just wrote a decent python ide

What's wrong with PyCharm or Eclipse?

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
Eclipse and vs are both good esp vs 2012.

  • Locked thread