• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 19:51
CET 00:51
KST 08:51
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Team Liquid Map Contest #22 - Presented by Monster Energy4ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13
Community News
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool24Weekly Cups (March 9-15): herO, Clem, ByuN win32026 KungFu Cup Announcement6BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains18
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Serral: 24’ EWC form was hurt by military service Weekly Cups (March 9-15): herO, Clem, ByuN win Team Liquid Map Contest #22 - Presented by Monster Energy Weekly Cups (August 25-31): Clem's Last Straw?
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament WardiTV Team League Season 10 KSL Week 87 [GSL CK] #2: Team Classic vs. Team Solar 2026 KungFu Cup Announcement
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 517 Distant Threat Mutation # 516 Specter of Death Mutation # 515 Together Forever
Brood War
General
JaeDong's form before ASL ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Gypsy to Korea BSL Season 22
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL22] Open Qualifiers & Ladder Tours IPSL Spring 2026 is here!
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Path of Exile General RTS Discussion Thread Stormgate/Frost Giant Megathread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread Mexico's Drug War
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Tokyo Olympics 2021 Thread General nutrition recommendations Cricket [SPORT]
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 4358 users

Alt+o on emacs

Blogs > araav
Post a Reply
araav
Profile Blog Joined September 2004
Armenia1590 Posts
March 13 2009 13:58 GMT
#1
yay, so happy..

recently i fully switched to emacs and i was missing the alt+o feature for visual assist (pressing alt+o switches between source and header files)

so, today i implemented this for me:

.emacs
---------------------------------------
....
(defun corresp_h (fln h) (let ((x (concat fln (string ?.) h))) (if (file-exists-p x) x nil)))
(defun corresp_hh (fl lst) (if (not (null lst)) (or (corresp_h fl (car lst)) (corresp_hh fl (cdr lst)))))
(defun corresponding (fln)
(let ((ext (file-name-extension fln)) (prefix (file-name-sans-extension fln)))
(cond
((string= ext "cpp") (corresp_hh prefix '("hpp" "h" "c")))
((string= ext "hpp") (corresp_hh prefix '("cpp" "c" "h")))
((string= ext "c") (corresp_hh prefix '("h" "hpp" "cpp")))
((string= ext "h") (corresp_hh prefix '("c" "cpp" "hpp")))
(t nil)
)
)
)

(defun switch-to-corresponding-hh (fln) (let* ( (fln2 (corresponding fln)) (buff (if (null fln2) nil (get-file-buffer fln2))))
(if (null buff) (if (not (null fln2)) (find-file fln2)) (switch-to-buffer buff))))

(defun switch-to-corresponding-h ()
"Swtich to the corresponding header/source file."
(interactive)
(switch-to-corresponding-hh buffer-file-name))

(global-set-key [?\A-\o] 'switch-to-corresponding-h)
---------------------------------------

i'm still a elisp newb, but fuck, this is awesome!
still yearn for ctrl+shift+v and context-sensitive auto-complete/goto definition features though

The flower that blooms in adversity is the most rare and beautiful of all.
hni
Profile Joined February 2009
Canada8 Posts
March 13 2009 14:06 GMT
#2
that's pretty awesome, although a more intuitive solution is to use a real editor. we're not in the 80s anymore. if you want a real job, you'll probably have to learn how to use visual studio, so why waste time on this emacs garbage?
araav
Profile Blog Joined September 2004
Armenia1590 Posts
March 13 2009 14:25 GMT
#3
haha real job? i have it 12 years already

vassist is just a plugin for visual studio. i use vstudio with eyes closed for 10+ years already.

i use emacs for Linux and it really rocks
The flower that blooms in adversity is the most rare and beautiful of all.
Sirakor
Profile Joined April 2003
Great Britain455 Posts
March 13 2009 14:27 GMT
#4
On March 13 2009 23:06 hni wrote:
that's pretty awesome, although a more intuitive solution is to use a real editor.


Up to here I thought you were going to bash emacs and show him the light to the one and only true editor - Vim. >

On March 13 2009 23:06 hni wrote:
we're not in the 80s anymore. if you want a real job, you'll probably have to learn how to use visual studio, so why waste time on this emacs garbage?


Both emacs and vim are much, much more powerful than you may realize, although they do have a steeper learning curve compared to the usual IDEs (visual studio, eclipse, etc). Also I don't think it makes a lot of sense to force your programmers to use a specific editor, so unless you work for M$ or are stuck in .NET so deeply that you don't see the rest of the world anymore, I really don't see that being an issue.

And for what it's worth... nah I will resist to rank the programmers I work with by their skill and try to correlate that to the editor they use ;-)
TheYango
Profile Joined September 2008
United States47024 Posts
Last Edited: 2009-03-13 15:59:06
March 13 2009 15:55 GMT
#5
On March 13 2009 23:06 hni wrote:
that's pretty awesome, although a more intuitive solution is to use a real editor. we're not in the 80s anymore. if you want a real job, you'll probably have to learn how to use visual studio, so why waste time on this emacs garbage?

Because it works? Depending on project size, simple editors can be far better for a project than an IDE. Most of the features present in IDEs either are implemented in Vim or Emacs, or can be added through various extensions, and both editors have plenty of things that modern IDEs haven't implemented.

Generally, it works out something like this:
Small Projects - You don't need powerful features, so a lightweight editor will be better for the job than an IDE
Medium-sized Projects - Code can get a little messy, so its good to have an IDE that can help you sort your work into a manageable way for you better than a text editor
Large Projects - There's simply so much code that you can't sort it in a useful fashion, and doing so starts to work against the IDE. A text editor becomes useful here again

Also, as far as I know, jobs don't "force" you to use one editor or another (its a really stupid thing to manage). Whatever gets your code written in the way they want should work.
Moderator
Insane
Profile Blog Joined November 2003
United States4991 Posts
March 13 2009 19:03 GMT
#6
On March 14 2009 00:55 TheYango wrote:
Show nested quote +
On March 13 2009 23:06 hni wrote:
that's pretty awesome, although a more intuitive solution is to use a real editor. we're not in the 80s anymore. if you want a real job, you'll probably have to learn how to use visual studio, so why waste time on this emacs garbage?

Because it works? Depending on project size, simple editors can be far better for a project than an IDE. Most of the features present in IDEs either are implemented in Vim or Emacs, or can be added through various extensions, and both editors have plenty of things that modern IDEs haven't implemented.

Generally, it works out something like this:
Small Projects - You don't need powerful features, so a lightweight editor will be better for the job than an IDE
Medium-sized Projects - Code can get a little messy, so its good to have an IDE that can help you sort your work into a manageable way for you better than a text editor
Large Projects - There's simply so much code that you can't sort it in a useful fashion, and doing so starts to work against the IDE. A text editor becomes useful here again

Also, as far as I know, jobs don't "force" you to use one editor or another (its a really stupid thing to manage). Whatever gets your code written in the way they want should work.

You may be 'forced' to use specific IDEs if test suites in the codebase are written for a specific IDE to run. I suppose you don't 'have' to use the IDE, but it makes the job significantly easier if you're a tester than trying to use some other text editor to write the code, and then run it in the IDE...
JeeJee
Profile Blog Joined July 2003
Canada5652 Posts
Last Edited: 2009-03-13 19:13:42
March 13 2009 19:11 GMT
#7
hahaha nice
i never cared for emacs, i'm a vim guy :-)
a friend of mine uses exclusively visual studio though. he writes good code, too. he usually spends a bit more time, but i'm not going to say that has anything to do with the choice of editor, that's just silly

use whatever you're comfortable with, and yes sometimes it was more comfortable for me to switch to an IDE, although it wasn't so much for the purposes of coding..

and of course the obligatory xkcd follows..
[image loading]
(\o/)  If you want it, you find a way. Otherwise you find excuses. No exceptions.
 /_\   aka Shinbi (requesting a name change since 27/05/09 ☺)
araav
Profile Blog Joined September 2004
Armenia1590 Posts
March 13 2009 19:32 GMT
#8
haha, yeah, good ol' xkcd
The flower that blooms in adversity is the most rare and beautiful of all.
miseiler
Profile Blog Joined October 2008
United States1389 Posts
Last Edited: 2009-03-13 19:45:05
March 13 2009 19:42 GMT
#9
On March 13 2009 23:06 hni wrote:
that's pretty awesome, although a more intuitive solution is to use a real editor. we're not in the 80s anymore. if you want a real job, you'll probably have to learn how to use visual studio, so why waste time on this emacs garbage?


What a useless comment.

It certainly depends on the field, doesn't it? In computational biology, Windows (and therefore Visual Studio) is a complete waste of time. You will probably have to learn a real language, too, which (except for C) Visual Studio doesn't even support.

Personally, I prefer vim, but I was an emacs guy before I started my phd.
"Jinro soo manly wearing only a T-Shirt while the Koreans freeze in their jackets" -- Double_O
"He's from Sweden, man. We have to fight polar bears on our way to school." -- Yusername
TheYango
Profile Joined September 2008
United States47024 Posts
March 13 2009 20:27 GMT
#10
[B]On March 14 2009 04:03 HnR)Insane wrote:[/B
You may be 'forced' to use specific IDEs if test suites in the codebase are written for a specific IDE to run. I suppose you don't 'have' to use the IDE, but it makes the job significantly easier if you're a tester than trying to use some other text editor to write the code, and then run it in the IDE...

*shrug* The basic point is the same. Which editor is better depends both on personal preference and the codebase you're working with. Ideally, having experience in multiple environments is useful, just like having experience with multiple programming languages is useful. To dismiss either text editors or IDEs is closed-minded.
Moderator
Please log in or register to reply.
Live Events Refresh
Next event in 3h 9m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft295
SpeCial 171
CosmosSc2 48
Livibee 43
Codebar 31
StarCraft: Brood War
Britney 17856
EffOrt 278
HiyA 47
Dota 2
canceldota192
League of Legends
JimRising 538
Counter-Strike
taco 169
minikerr13
Super Smash Bros
C9.Mang0413
hungrybox292
Other Games
B2W.Neo638
ToD115
ViBE114
Trikslyr53
PPMD19
Organizations
Other Games
gamesdonequick471
Dota 2
PGL Dota 2 - Main Stream130
Other Games
BasetradeTV78
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 90
• RyuSc2 21
• Kozan
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21983
League of Legends
• Doublelift4000
Other Games
• Scarra1051
• imaqtpie985
• Shiphtur183
Upcoming Events
Korean StarCraft League
3h 9m
RSL Revival
10h 9m
Maru vs Zoun
Cure vs ByuN
uThermal 2v2 Circuit
15h 9m
BSL
20h 9m
RSL Revival
1d 10h
herO vs MaxPax
Rogue vs TriGGeR
BSL
1d 20h
Replay Cast
2 days
Replay Cast
2 days
Afreeca Starleague
2 days
Sharp vs Scan
Rain vs Mong
Wardi Open
2 days
[ Show More ]
Monday Night Weeklies
2 days
Sparkling Tuna Cup
3 days
Afreeca Starleague
3 days
Soulkey vs Ample
JyJ vs sSak
Replay Cast
4 days
Afreeca Starleague
4 days
hero vs YSC
Larva vs Shine
Kung Fu Cup
4 days
Replay Cast
5 days
The PondCast
5 days
WardiTV Team League
5 days
Replay Cast
6 days
WardiTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-03-18
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
CSL Elite League 2026
Proleague 2026-03-20
RSL Revival: Season 4
Nations Cup 2026
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
CSL 2026 SPRING (S20)
CSL Season 20: Qualifier 1
Acropolis #4
IPSL Spring 2026
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
NationLESS Cup
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.