 	                 "(a,|b)" "(a, (|) b)"
 	                 "(a,|)" "(a, (|))"
 	                 "\\| " "\\(| "
+	                 "~|" "~(|)"
+	                 "~@|" "~@(|)"
 	                 "\\\\| " "\\\\ (|) "}]
 	    [")"         :paredit-close-round
 	                {"(a |b)" "(a b)|"

(def *open-brackets* (conj (set "([{") nil)) ; we add nil to the list to also match beginning of text 
(def *close-brackets* (conj (set ")]}") nil)) ; we add nil to the list to also match end of text

(defn text-spec-to-text 
  "Converts a text spec to text map" 
  [#^String text-spec]

  ([{:keys [#^String text offset length] :as t}] (previous-char t 1))
  ([{:keys [#^String text offset length] :as t} n]
    (assert (>= length 0))
    (when (< -1 (- offset n) (.length text))
      (.charAt text (- offset n)))))
  
(defn next-char [{:keys [#^String text offset length] :as t}]
  (assert (>= length 0))
  (when (< -1 (+ offset length) (.length text))
    (.charAt text (+ offset length))))
  
(defmulti paredit (fn [k & args] k))
