Author Topic: How to get the document mode of the current buffer?  (Read 4223 times)

Bamsen

  • Community Member
  • Posts: 66
  • Hero Points: 8
How to get the document mode of the current buffer?
« on: May 08, 2017, 10:59:28 AM »
Hi,

I want to use new_file("<mode>") to create a new buffer of the same type as my current buffer. (XML, Plain Text ....)
How can I get the document mode of my current buffer to feed in to new_file?

---
Morten A. Steien

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: How to get the document mode of the current buffer?
« Reply #1 on: May 08, 2017, 05:48:01 PM »
      _str modeName = _LangGetModeName(p_LangId);


Bamsen

  • Community Member
  • Posts: 66
  • Hero Points: 8
Re: How to get the document mode of the current buffer?
« Reply #2 on: May 09, 2017, 05:58:10 AM »
Perfect!
Thank you for your help.  :)